(function() {
  window.SLConfig = {"active":true,"disabled":false,"test_mode":false,"scan_forms":true,"app_url":"https://dash.sparkloop.app","script_url":"https://js.sparkloop.app","uuid":"team_b3435e91a3","plan":"convertkit_pro","provider":"convertkit","form_selector":"form","campaigns":true,"widgets":{"referral_hubs":[{"campaign_id":"MFe9063053ad","styling":{"colors":{"primary":"#327fd2","secondary":"#e9e8e8","headers":"#080a0d"},"custom_css":"#sl-form-screen {}\r\n#sl-form-screen \u003e section {}\r\n#sl-form-screen \u003e section h2 {}","powered_by_enabled":false},"form_widget":{"cover_image":{"enabled":false,"url":"https://dash.sparkloop.app/images/placeholder-image.jpg","position":"left"},"header":"Share Physiqonomics Weekly, Earn Rewards","subheader":"Get your friends to subscribe and earn rewards. The more subscribers you refer, the bigger the rewards.","form":{"name_input":{"enabled":true,"placeholder":"Your name"},"email_input":{"placeholder":"Your email"},"button":{"label":"Join"}},"tabs":{"how_it_works":{"enabled":true,"label":"How it works","content":"Share **Newsletter Name** and Earn Rewards When Friends You Refer Subscribe:\r\n\r\n- Refer 3 friends to redeem a $5 gift card\r\n- Refer 5 friends to redeem a specially designed coffee mug\r\n- Refer 15 friends to redeem a specially designed hat\r\n\r\nQuestions? Email us at support@mywebsite.com"},"terms":{"enabled":false,"label":"Terms \u0026 Conditions","url":""}}},"hub_widget":{"header":"Share the Vitamin, Earn Rewards","subheader":"","rewards":{"enabled":true,"layout":"horizontal","list":[{"id":"reward_60c519dcc8","image":"https://dash.sparkloop.app/assets/trophy-28b4ec9e47747ae414a5b0e7b92c1b4540fae2f0624b37da7e07e707b014d715.png","name":"Access to the Vitamin Archive","description":"","referrals":2,"recurring":false}]},"sharing":{"referral_link":{"header":"Share your link","button":{"label":"Copy Link"}},"social_links":{"enabled":true,"header":"Or share with:","socials":{"twitter":{"enabled":true,"message":"I just signed up on this awesome newsletter!"},"facebook":{"enabled":true},"facebook_messenger":{"enabled":true},"email":{"enabled":true,"message":"I just signed up on this awesome newsletter!","subject":"Check this out"},"whatsapp":{"enabled":true,"message":"I just signed up on this awesome newsletter!"},"linkedin":{"enabled":false},"telegram":{"enabled":false,"message":"I just signed up on this awesome newsletter!"},"line":{"enabled":false,"message":"I just signed up on this awesome newsletter!"}}},"email_invitation":{"enabled":true,"header":"Send to friends via email","placeholder":"Comma separated emails (max 5)","button":{"label":"Send"},"confirmation_message":"The invites have been sent","email":{"subject":"Check this out","body":"Hey, I highly recommend giving [YOUR NEWSLETTER NAME] a read. It's an awesome daily email...[EXPLAIN WHY IT'S AWESOME]. Best of all, it's free, and only takes 5 minutes to read.\r\n\r\nGive it a try and subscribe using my personal invite link below:"}}},"referrals":{"confirmed":{"enabled":true,"label":"confirmed referrals"},"pending":{"enabled":true,"label":"pending referrals"},"next":{"enabled":true,"label":"referrals to next reward"}}}}],"upscribes":[{"enabled":true,"uuid":"upscribe_093b9a76b58d","selector":"form","header":"You're subscribed!","subheader":"Aadam Ali recommends...","button_label":"Subscribe to these publications","skip_link":"Maybe later","after_submission":{"behaviour":"redirect","default_redirect_url":"https://","custom_behaviour_rules":[],"thank_you_message":null},"visibility":{"installation":null,"all_pages":true,"rules":[]},"styling":{"colors":{"primary":"#d742a8"},"custom_css":"/* Upscribe main container */\n#sparkloop-upscribe {}\n\n/* Header */\n#sparkloop-upscribe form \u003e header {}\n  #sparkloop-upscribe form \u003e header h2 {}\n\n/* Recommendations */\n#sparkloop-upscribe form \u003e ul {}\n#sparkloop-upscribe form \u003e ul li {}\n\n  /* Recommendation's image */\n  #sparkloop-upscribe form \u003e ul li label main \u003e figure {}\n\n  /* Recommendation's copy */\n  #sparkloop-upscribe form \u003e ul li label main \u003e div h3 {}\n  #sparkloop-upscribe form \u003e ul li label main \u003e div p {}\n\n/* Footer */\n#sparkloop-upscribe form \u003e footer {}\n  /* Button */\n  #sparkloop-upscribe form \u003e footer .sl-button {}\n  /* \"Maybe later\" link */\n  #sparkloop-upscribe form \u003e footer \u003e a.sl-skip-link {}\n","powered_by_enabled":true}}],"upscribe_ref":"sparkloop-upscribe"}};
  (()=>{var qi=Object.create;var Vt=Object.defineProperty;var Xi=Object.getOwnPropertyDescriptor;var Yi=Object.getOwnPropertyNames;var Zi=Object.getPrototypeOf,Ji=Object.prototype.hasOwnProperty;var Ht=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Qi=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Yi(e))!Ji.call(t,a)&&a!==r&&Vt(t,a,{get:()=>e[a],enumerable:!(n=Xi(e,a))||n.enumerable});return t};var Wt=(t,e,r)=>(r=t!=null?qi(Zi(t)):{},Qi(e||!t||!t.__esModule?Vt(r,"default",{value:t,enumerable:!0}):r,t));var hr=Ht((mr,ot)=>{(function(t,e,r){"use strict";typeof window<"u"&&typeof define=="function"&&define.amd?define(r):typeof ot<"u"&&ot.exports?ot.exports=r():e.exports?e.exports=r():e[t]=r()})("Fingerprint2",mr,function(){"use strict";typeof Array.isArray>"u"&&(Array.isArray=function(i){return Object.prototype.toString.call(i)==="[object Array]"});var t=function(i,o){i=[i[0]>>>16,i[0]&65535,i[1]>>>16,i[1]&65535],o=[o[0]>>>16,o[0]&65535,o[1]>>>16,o[1]&65535];var s=[0,0,0,0];return s[3]+=i[3]+o[3],s[2]+=s[3]>>>16,s[3]&=65535,s[2]+=i[2]+o[2],s[1]+=s[2]>>>16,s[2]&=65535,s[1]+=i[1]+o[1],s[0]+=s[1]>>>16,s[1]&=65535,s[0]+=i[0]+o[0],s[0]&=65535,[s[0]<<16|s[1],s[2]<<16|s[3]]},e=function(i,o){i=[i[0]>>>16,i[0]&65535,i[1]>>>16,i[1]&65535],o=[o[0]>>>16,o[0]&65535,o[1]>>>16,o[1]&65535];var s=[0,0,0,0];return s[3]+=i[3]*o[3],s[2]+=s[3]>>>16,s[3]&=65535,s[2]+=i[2]*o[3],s[1]+=s[2]>>>16,s[2]&=65535,s[2]+=i[3]*o[2],s[1]+=s[2]>>>16,s[2]&=65535,s[1]+=i[1]*o[3],s[0]+=s[1]>>>16,s[1]&=65535,s[1]+=i[2]*o[2],s[0]+=s[1]>>>16,s[1]&=65535,s[1]+=i[3]*o[1],s[0]+=s[1]>>>16,s[1]&=65535,s[0]+=i[0]*o[3]+i[1]*o[2]+i[2]*o[1]+i[3]*o[0],s[0]&=65535,[s[0]<<16|s[1],s[2]<<16|s[3]]},r=function(i,o){return o%=64,o===32?[i[1],i[0]]:o<32?[i[0]<<o|i[1]>>>32-o,i[1]<<o|i[0]>>>32-o]:(o-=32,[i[1]<<o|i[0]>>>32-o,i[0]<<o|i[1]>>>32-o])},n=function(i,o){return o%=64,o===0?i:o<32?[i[0]<<o|i[1]>>>32-o,i[1]<<o]:[i[1]<<o-32,0]},a=function(i,o){return[i[0]^o[0],i[1]^o[1]]},c=function(i){return i=a(i,[0,i[0]>>>1]),i=e(i,[4283543511,3981806797]),i=a(i,[0,i[0]>>>1]),i=e(i,[3301882366,444984403]),i=a(i,[0,i[0]>>>1]),i},u=function(i,o){i=i||"",o=o||0;for(var s=i.length%16,l=i.length-s,p=[0,o],m=[0,o],g=[0,0],b=[0,0],E=[2277735313,289559509],P=[1291169091,658871167],v=0;v<l;v=v+16)g=[i.charCodeAt(v+4)&255|(i.charCodeAt(v+5)&255)<<8|(i.charCodeAt(v+6)&255)<<16|(i.charCodeAt(v+7)&255)<<24,i.charCodeAt(v)&255|(i.charCodeAt(v+1)&255)<<8|(i.charCodeAt(v+2)&255)<<16|(i.charCodeAt(v+3)&255)<<24],b=[i.charCodeAt(v+12)&255|(i.charCodeAt(v+13)&255)<<8|(i.charCodeAt(v+14)&255)<<16|(i.charCodeAt(v+15)&255)<<24,i.charCodeAt(v+8)&255|(i.charCodeAt(v+9)&255)<<8|(i.charCodeAt(v+10)&255)<<16|(i.charCodeAt(v+11)&255)<<24],g=e(g,E),g=r(g,31),g=e(g,P),p=a(p,g),p=r(p,27),p=t(p,m),p=t(e(p,[0,5]),[0,1390208809]),b=e(b,P),b=r(b,33),b=e(b,E),m=a(m,b),m=r(m,31),m=t(m,p),m=t(e(m,[0,5]),[0,944331445]);switch(g=[0,0],b=[0,0],s){case 15:b=a(b,n([0,i.charCodeAt(v+14)],48));case 14:b=a(b,n([0,i.charCodeAt(v+13)],40));case 13:b=a(b,n([0,i.charCodeAt(v+12)],32));case 12:b=a(b,n([0,i.charCodeAt(v+11)],24));case 11:b=a(b,n([0,i.charCodeAt(v+10)],16));case 10:b=a(b,n([0,i.charCodeAt(v+9)],8));case 9:b=a(b,[0,i.charCodeAt(v+8)]),b=e(b,P),b=r(b,33),b=e(b,E),m=a(m,b);case 8:g=a(g,n([0,i.charCodeAt(v+7)],56));case 7:g=a(g,n([0,i.charCodeAt(v+6)],48));case 6:g=a(g,n([0,i.charCodeAt(v+5)],40));case 5:g=a(g,n([0,i.charCodeAt(v+4)],32));case 4:g=a(g,n([0,i.charCodeAt(v+3)],24));case 3:g=a(g,n([0,i.charCodeAt(v+2)],16));case 2:g=a(g,n([0,i.charCodeAt(v+1)],8));case 1:g=a(g,[0,i.charCodeAt(v)]),g=e(g,E),g=r(g,31),g=e(g,P),p=a(p,g)}return p=a(p,[0,i.length]),m=a(m,[0,i.length]),p=t(p,m),m=t(m,p),p=c(p),m=c(m),p=t(p,m),m=t(m,p),("00000000"+(p[0]>>>0).toString(16)).slice(-8)+("00000000"+(p[1]>>>0).toString(16)).slice(-8)+("00000000"+(m[0]>>>0).toString(16)).slice(-8)+("00000000"+(m[1]>>>0).toString(16)).slice(-8)},d={preprocessor:null,audio:{timeout:1e3,excludeIOS11:!0},fonts:{swfContainerId:"fingerprintjs2",swfPath:"flash/compiled/FontList.swf",userDefinedFonts:[],extendedJsFonts:!1},screen:{detectScreenOrientation:!0},plugins:{sortPluginsFor:[/palemoon/i],excludeIE:!1},extraComponents:[],excludes:{enumerateDevices:!0,pixelRatio:!0,doNotTrack:!0,fontsFlash:!0,adBlock:!0},NOT_AVAILABLE:"not available",ERROR:"error",EXCLUDED:"excluded"},f=function(i,o){if(Array.prototype.forEach&&i.forEach===Array.prototype.forEach)i.forEach(o);else if(i.length===+i.length)for(var s=0,l=i.length;s<l;s++)o(i[s],s,i);else for(var p in i)i.hasOwnProperty(p)&&o(i[p],p,i)},y=function(i,o){var s=[];return i==null?s:Array.prototype.map&&i.map===Array.prototype.map?i.map(o):(f(i,function(l,p,m){s.push(o(l,p,m))}),s)},w=function(i,o){if(o==null)return i;var s,l;for(l in o)s=o[l],s!=null&&!Object.prototype.hasOwnProperty.call(i,l)&&(i[l]=s);return i},L=function(i,o){if(!C())return i(o.NOT_AVAILABLE);navigator.mediaDevices.enumerateDevices().then(function(s){i(s.map(function(l){return"id="+l.deviceId+";gid="+l.groupId+";"+l.kind+";"+l.label}))}).catch(function(s){i(s)})},C=function(){return navigator.mediaDevices&&navigator.mediaDevices.enumerateDevices},D=function(i,o){var s=o.audio;if(s.excludeIOS11&&navigator.userAgent.match(/OS 11.+Version\/11.+Safari/))return i(o.EXCLUDED);var l=window.OfflineAudioContext||window.webkitOfflineAudioContext;if(l==null)return i(o.NOT_AVAILABLE);var p=new l(1,44100,44100),m=p.createOscillator();m.type="triangle",m.frequency.setValueAtTime(1e4,p.currentTime);var g=p.createDynamicsCompressor();f([["threshold",-50],["knee",40],["ratio",12],["reduction",-20],["attack",0],["release",.25]],function(E){g[E[0]]!==void 0&&typeof g[E[0]].setValueAtTime=="function"&&g[E[0]].setValueAtTime(E[1],p.currentTime)}),m.connect(g),g.connect(p.destination),m.start(0),p.startRendering();var b=setTimeout(function(){return console.warn('Audio fingerprint timed out. Please report bug at https://github.com/fingerprintjs/fingerprintjs with your user agent: "'+navigator.userAgent+'".'),p.oncomplete=function(){},p=null,i("audioTimeout")},s.timeout);p.oncomplete=function(E){var P;try{clearTimeout(b),P=E.renderedBuffer.getChannelData(0).slice(4500,5e3).reduce(function(v,se){return v+Math.abs(se)},0).toString(),m.disconnect(),g.disconnect()}catch(v){i(v);return}i(P)}},T=function(i){i(navigator.userAgent)},R=function(i,o){i(navigator.webdriver==null?o.NOT_AVAILABLE:navigator.webdriver)},j=function(i,o){i(navigator.language||navigator.userLanguage||navigator.browserLanguage||navigator.systemLanguage||o.NOT_AVAILABLE)},Ke=function(i,o){i(window.screen.colorDepth||o.NOT_AVAILABLE)},ze=function(i,o){i(navigator.deviceMemory||o.NOT_AVAILABLE)},Ae=function(i,o){i(window.devicePixelRatio||o.NOT_AVAILABLE)},O=function(i,o){i(q(o))},q=function(i){var o=[window.screen.width,window.screen.height];return i.screen.detectScreenOrientation&&o.sort().reverse(),o},X=function(i,o){i(Z(o))},Z=function(i){if(window.screen.availWidth&&window.screen.availHeight){var o=[window.screen.availHeight,window.screen.availWidth];return i.screen.detectScreenOrientation&&o.sort().reverse(),o}return i.NOT_AVAILABLE},ve=function(i){i(new Date().getTimezoneOffset())},ye=function(i,o){if(window.Intl&&window.Intl.DateTimeFormat){i(new window.Intl.DateTimeFormat().resolvedOptions().timeZone||o.NOT_AVAILABLE);return}i(o.NOT_AVAILABLE)},$=function(i,o){i(_i(o))},qe=function(i,o){i(Si(o))},ht=function(i,o){i(Ei(o))},ti=function(i){i(!!window.HTMLElement.prototype.addBehavior)},ri=function(i){i(!!window.openDatabase)},ii=function(i,o){i(Ci(o))},ni=function(i,o){i(Ti(o))},ai=function(i,o){i(ki(o))},oi=function(i,o){if(Ft()){i(Li(o));return}i(o.NOT_AVAILABLE)},si=function(i,o){if(Nt()){i(Bi());return}i(o.NOT_AVAILABLE)},li=function(i){if(Nt()){i(Pi());return}i()},ci=function(i){i(Ii())},ui=function(i){i(Oi())},di=function(i){i(Ri())},fi=function(i){i(Mi())},pi=function(i){i(Di())},mi=function(i,o){if(!Ni())return i("swf object not loaded");if(!Gi())return i("flash not installed");if(!o.fonts.swfPath)return i("missing options.fonts.swfPath");Vi(function(s){i(s)},o)},hi=function(i,o){var s=["monospace","sans-serif","serif"],l=["Andale Mono","Arial","Arial Black","Arial Hebrew","Arial MT","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Bitstream Vera Sans Mono","Book Antiqua","Bookman Old Style","Calibri","Cambria","Cambria Math","Century","Century Gothic","Century Schoolbook","Comic Sans","Comic Sans MS","Consolas","Courier","Courier New","Geneva","Georgia","Helvetica","Helvetica Neue","Impact","Lucida Bright","Lucida Calligraphy","Lucida Console","Lucida Fax","LUCIDA GRANDE","Lucida Handwriting","Lucida Sans","Lucida Sans Typewriter","Lucida Sans Unicode","Microsoft Sans Serif","Monaco","Monotype Corsiva","MS Gothic","MS Outlook","MS PGothic","MS Reference Sans Serif","MS Sans Serif","MS Serif","MYRIAD","MYRIAD PRO","Palatino","Palatino Linotype","Segoe Print","Segoe Script","Segoe UI","Segoe UI Light","Segoe UI Semibold","Segoe UI Symbol","Tahoma","Times","Times New Roman","Times New Roman PS","Trebuchet MS","Verdana","Wingdings","Wingdings 2","Wingdings 3"];if(o.fonts.extendedJsFonts){var p=["Abadi MT Condensed Light","Academy Engraved LET","ADOBE CASLON PRO","Adobe Garamond","ADOBE GARAMOND PRO","Agency FB","Aharoni","Albertus Extra Bold","Albertus Medium","Algerian","Amazone BT","American Typewriter","American Typewriter Condensed","AmerType Md BT","Andalus","Angsana New","AngsanaUPC","Antique Olive","Aparajita","Apple Chancery","Apple Color Emoji","Apple SD Gothic Neo","Arabic Typesetting","ARCHER","ARNO PRO","Arrus BT","Aurora Cn BT","AvantGarde Bk BT","AvantGarde Md BT","AVENIR","Ayuthaya","Bandy","Bangla Sangam MN","Bank Gothic","BankGothic Md BT","Baskerville","Baskerville Old Face","Batang","BatangChe","Bauer Bodoni","Bauhaus 93","Bazooka","Bell MT","Bembo","Benguiat Bk BT","Berlin Sans FB","Berlin Sans FB Demi","Bernard MT Condensed","BernhardFashion BT","BernhardMod BT","Big Caslon","BinnerD","Blackadder ITC","BlairMdITC TT","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bodoni MT","Bodoni MT Black","Bodoni MT Condensed","Bodoni MT Poster Compressed","Bookshelf Symbol 7","Boulder","Bradley Hand","Bradley Hand ITC","Bremen Bd BT","Britannic Bold","Broadway","Browallia New","BrowalliaUPC","Brush Script MT","Californian FB","Calisto MT","Calligrapher","Candara","CaslonOpnface BT","Castellar","Centaur","Cezanne","CG Omega","CG Times","Chalkboard","Chalkboard SE","Chalkduster","Charlesworth","Charter Bd BT","Charter BT","Chaucer","ChelthmITC Bk BT","Chiller","Clarendon","Clarendon Condensed","CloisterBlack BT","Cochin","Colonna MT","Constantia","Cooper Black","Copperplate","Copperplate Gothic","Copperplate Gothic Bold","Copperplate Gothic Light","CopperplGoth Bd BT","Corbel","Cordia New","CordiaUPC","Cornerstone","Coronet","Cuckoo","Curlz MT","DaunPenh","Dauphin","David","DB LCD Temp","DELICIOUS","Denmark","DFKai-SB","Didot","DilleniaUPC","DIN","DokChampa","Dotum","DotumChe","Ebrima","Edwardian Script ITC","Elephant","English 111 Vivace BT","Engravers MT","EngraversGothic BT","Eras Bold ITC","Eras Demi ITC","Eras Light ITC","Eras Medium ITC","EucrosiaUPC","Euphemia","Euphemia UCAS","EUROSTILE","Exotc350 Bd BT","FangSong","Felix Titling","Fixedsys","FONTIN","Footlight MT Light","Forte","FrankRuehl","Fransiscan","Freefrm721 Blk BT","FreesiaUPC","Freestyle Script","French Script MT","FrnkGothITC Bk BT","Fruitger","FRUTIGER","Futura","Futura Bk BT","Futura Lt BT","Futura Md BT","Futura ZBlk BT","FuturaBlack BT","Gabriola","Galliard BT","Gautami","Geeza Pro","Geometr231 BT","Geometr231 Hv BT","Geometr231 Lt BT","GeoSlab 703 Lt BT","GeoSlab 703 XBd BT","Gigi","Gill Sans","Gill Sans MT","Gill Sans MT Condensed","Gill Sans MT Ext Condensed Bold","Gill Sans Ultra Bold","Gill Sans Ultra Bold Condensed","Gisha","Gloucester MT Extra Condensed","GOTHAM","GOTHAM BOLD","Goudy Old Style","Goudy Stout","GoudyHandtooled BT","GoudyOLSt BT","Gujarati Sangam MN","Gulim","GulimChe","Gungsuh","GungsuhChe","Gurmukhi MN","Haettenschweiler","Harlow Solid Italic","Harrington","Heather","Heiti SC","Heiti TC","HELV","Herald","High Tower Text","Hiragino Kaku Gothic ProN","Hiragino Mincho ProN","Hoefler Text","Humanst 521 Cn BT","Humanst521 BT","Humanst521 Lt BT","Imprint MT Shadow","Incised901 Bd BT","Incised901 BT","Incised901 Lt BT","INCONSOLATA","Informal Roman","Informal011 BT","INTERSTATE","IrisUPC","Iskoola Pota","JasmineUPC","Jazz LET","Jenson","Jester","Jokerman","Juice ITC","Kabel Bk BT","Kabel Ult BT","Kailasa","KaiTi","Kalinga","Kannada Sangam MN","Kartika","Kaufmann Bd BT","Kaufmann BT","Khmer UI","KodchiangUPC","Kokila","Korinna BT","Kristen ITC","Krungthep","Kunstler Script","Lao UI","Latha","Leelawadee","Letter Gothic","Levenim MT","LilyUPC","Lithograph","Lithograph Light","Long Island","Lydian BT","Magneto","Maiandra GD","Malayalam Sangam MN","Malgun Gothic","Mangal","Marigold","Marion","Marker Felt","Market","Marlett","Matisse ITC","Matura MT Script Capitals","Meiryo","Meiryo UI","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Tai Le","Microsoft Uighur","Microsoft YaHei","Microsoft Yi Baiti","MingLiU","MingLiU_HKSCS","MingLiU_HKSCS-ExtB","MingLiU-ExtB","Minion","Minion Pro","Miriam","Miriam Fixed","Mistral","Modern","Modern No. 20","Mona Lisa Solid ITC TT","Mongolian Baiti","MONO","MoolBoran","Mrs Eaves","MS LineDraw","MS Mincho","MS PMincho","MS Reference Specialty","MS UI Gothic","MT Extra","MUSEO","MV Boli","Nadeem","Narkisim","NEVIS","News Gothic","News GothicMT","NewsGoth BT","Niagara Engraved","Niagara Solid","Noteworthy","NSimSun","Nyala","OCR A Extended","Old Century","Old English Text MT","Onyx","Onyx BT","OPTIMA","Oriya Sangam MN","OSAKA","OzHandicraft BT","Palace Script MT","Papyrus","Parchment","Party LET","Pegasus","Perpetua","Perpetua Titling MT","PetitaBold","Pickwick","Plantagenet Cherokee","Playbill","PMingLiU","PMingLiU-ExtB","Poor Richard","Poster","PosterBodoni BT","PRINCETOWN LET","Pristina","PTBarnum BT","Pythagoras","Raavi","Rage Italic","Ravie","Ribbon131 Bd BT","Rockwell","Rockwell Condensed","Rockwell Extra Bold","Rod","Roman","Sakkal Majalla","Santa Fe LET","Savoye LET","Sceptre","Script","Script MT Bold","SCRIPTINA","Serifa","Serifa BT","Serifa Th BT","ShelleyVolante BT","Sherwood","Shonar Bangla","Showcard Gothic","Shruti","Signboard","SILKSCREEN","SimHei","Simplified Arabic","Simplified Arabic Fixed","SimSun","SimSun-ExtB","Sinhala Sangam MN","Sketch Rockwell","Skia","Small Fonts","Snap ITC","Snell Roundhand","Socket","Souvenir Lt BT","Staccato222 BT","Steamer","Stencil","Storybook","Styllo","Subway","Swis721 BlkEx BT","Swiss911 XCm BT","Sylfaen","Synchro LET","System","Tamil Sangam MN","Technical","Teletype","Telugu Sangam MN","Tempus Sans ITC","Terminal","Thonburi","Traditional Arabic","Trajan","TRAJAN PRO","Tristan","Tubular","Tunga","Tw Cen MT","Tw Cen MT Condensed","Tw Cen MT Condensed Extra Bold","TypoUpright BT","Unicorn","Univers","Univers CE 55 Medium","Univers Condensed","Utsaah","Vagabond","Vani","Vijaya","Viner Hand ITC","VisualUI","Vivaldi","Vladimir Script","Vrinda","Westminster","WHITNEY","Wide Latin","ZapfEllipt BT","ZapfHumnst BT","ZapfHumnst Dm BT","Zapfino","Zurich BlkEx BT","Zurich Ex BT","ZWAdobeF"];l=l.concat(p)}l=l.concat(o.fonts.userDefinedFonts),l=l.filter(function(_,M){return l.indexOf(_)===M});var m="mmmmmmmmmmlli",g="72px",b=document.getElementsByTagName("body")[0],E=document.createElement("div"),P=document.createElement("div"),v={},se={},N=function(){var _=document.createElement("span");return _.style.position="absolute",_.style.left="-9999px",_.style.fontSize=g,_.style.fontStyle="normal",_.style.fontWeight="normal",_.style.letterSpacing="normal",_.style.lineBreak="auto",_.style.lineHeight="normal",_.style.textTransform="none",_.style.textAlign="left",_.style.textDecoration="none",_.style.textShadow="none",_.style.whiteSpace="normal",_.style.wordBreak="normal",_.style.wordSpacing="normal",_.innerHTML=m,_},de=function(_,M){var V=N();return V.style.fontFamily="'"+_+"',"+M,V},le=function(){for(var _=[],M=0,V=s.length;M<V;M++){var _e=N();_e.style.fontFamily=s[M],E.appendChild(_e),_.push(_e)}return _},fe=function(){for(var _={},M=0,V=l.length;M<V;M++){for(var _e=[],vt=0,zi=s.length;vt<zi;vt++){var $t=de(l[M],s[vt]);P.appendChild($t),_e.push($t)}_[l[M]]=_e}return _},bt=function(_){for(var M=!1,V=0;V<s.length;V++)if(M=_[V].offsetWidth!==v[s[V]]||_[V].offsetHeight!==se[s[V]],M)return M;return M},Ye=le();b.appendChild(E);for(var we=0,Wi=s.length;we<Wi;we++)v[s[we]]=Ye[we].offsetWidth,se[s[we]]=Ye[we].offsetHeight;var ji=fe();b.appendChild(P);for(var Gt=[],Ze=0,Ki=l.length;Ze<Ki;Ze++)bt(ji[l[Ze]])&&Gt.push(l[Ze]);b.removeChild(P),b.removeChild(E),i(Gt)},gi=function(i,o){Ui()?o.plugins.excludeIE?i(o.EXCLUDED):i(bi(o)):i(Ut(o))},Ut=function(i){if(navigator.plugins==null)return i.NOT_AVAILABLE;for(var o=[],s=0,l=navigator.plugins.length;s<l;s++)navigator.plugins[s]&&o.push(navigator.plugins[s]);return vi(i)&&(o=o.sort(function(p,m){return p.name>m.name?1:p.name<m.name?-1:0})),y(o,function(p){var m=y(p,function(g){return[g.type,g.suffixes]});return[p.name,p.description,m]})},bi=function(i){var o=[];if(Object.getOwnPropertyDescriptor&&Object.getOwnPropertyDescriptor(window,"ActiveXObject")||"ActiveXObject"in window){var s=["AcroPDF.PDF","Adodb.Stream","AgControl.AgControl","DevalVRXCtrl.DevalVRXCtrl.1","MacromediaFlashPaper.MacromediaFlashPaper","Msxml2.DOMDocument","Msxml2.XMLHTTP","PDF.PdfCtrl","QuickTime.QuickTime","QuickTimeCheckObject.QuickTimeCheck.1","RealPlayer","RealPlayer.RealPlayer(tm) ActiveX Control (32-bit)","RealVideo.RealVideo(tm) ActiveX Control (32-bit)","Scripting.Dictionary","SWCtl.SWCtl","Shell.UIHelper","ShockwaveFlash.ShockwaveFlash","Skype.Detection","TDCCtl.TDCCtl","WMPlayer.OCX","rmocx.RealPlayer G2 Control","rmocx.RealPlayer G2 Control.1"];o=y(s,function(l){try{return new window.ActiveXObject(l),l}catch{return i.ERROR}})}else o.push(i.NOT_AVAILABLE);return navigator.plugins&&(o=o.concat(Ut(i))),o},vi=function(i){for(var o=!1,s=0,l=i.plugins.sortPluginsFor.length;s<l;s++){var p=i.plugins.sortPluginsFor[s];if(navigator.userAgent.match(p)){o=!0;break}}return o},yi=function(i){i(Ai())},wi=function(i,o){i(xi(o))},_i=function(i){try{return!!window.sessionStorage}catch{return i.ERROR}},Si=function(i){try{return!!window.localStorage}catch{return i.ERROR}},Ei=function(i){if(Fi())return i.EXCLUDED;try{return!!window.indexedDB}catch{return i.ERROR}},xi=function(i){return navigator.hardwareConcurrency?navigator.hardwareConcurrency:i.NOT_AVAILABLE},Ci=function(i){return navigator.cpuClass||i.NOT_AVAILABLE},Ti=function(i){return navigator.platform?navigator.platform:i.NOT_AVAILABLE},ki=function(i){return navigator.doNotTrack?navigator.doNotTrack:navigator.msDoNotTrack?navigator.msDoNotTrack:window.doNotTrack?window.doNotTrack:i.NOT_AVAILABLE},Ai=function(){var i=0,o;typeof navigator.maxTouchPoints<"u"?i=navigator.maxTouchPoints:typeof navigator.msMaxTouchPoints<"u"&&(i=navigator.msMaxTouchPoints);try{document.createEvent("TouchEvent"),o=!0}catch{o=!1}var s="ontouchstart"in window;return[i,o,s]},Li=function(i){var o=[],s=document.createElement("canvas");s.width=2e3,s.height=200,s.style.display="inline";var l=s.getContext("2d");return l.rect(0,0,10,10),l.rect(2,2,6,6),o.push("canvas winding:"+(l.isPointInPath(5,5,"evenodd")===!1?"yes":"no")),l.textBaseline="alphabetic",l.fillStyle="#f60",l.fillRect(125,1,62,20),l.fillStyle="#069",i.dontUseFakeFontInCanvas?l.font="11pt Arial":l.font="11pt no-real-font-123",l.fillText("Cwm fjordbank glyphs vext quiz, \u{1F603}",2,15),l.fillStyle="rgba(102, 204, 0, 0.2)",l.font="18pt Arial",l.fillText("Cwm fjordbank glyphs vext quiz, \u{1F603}",4,45),l.globalCompositeOperation="multiply",l.fillStyle="rgb(255,0,255)",l.beginPath(),l.arc(50,50,50,0,Math.PI*2,!0),l.closePath(),l.fill(),l.fillStyle="rgb(0,255,255)",l.beginPath(),l.arc(100,50,50,0,Math.PI*2,!0),l.closePath(),l.fill(),l.fillStyle="rgb(255,255,0)",l.beginPath(),l.arc(75,100,50,0,Math.PI*2,!0),l.closePath(),l.fill(),l.fillStyle="rgb(255,0,255)",l.arc(75,75,75,0,Math.PI*2,!0),l.arc(75,75,25,0,Math.PI*2,!0),l.fill("evenodd"),s.toDataURL&&o.push("canvas fp:"+s.toDataURL()),o},Bi=function(){var i,o=function(N){return i.clearColor(0,0,0,1),i.enable(i.DEPTH_TEST),i.depthFunc(i.LEQUAL),i.clear(i.COLOR_BUFFER_BIT|i.DEPTH_BUFFER_BIT),"["+N[0]+", "+N[1]+"]"},s=function(N){var de=N.getExtension("EXT_texture_filter_anisotropic")||N.getExtension("WEBKIT_EXT_texture_filter_anisotropic")||N.getExtension("MOZ_EXT_texture_filter_anisotropic");if(de){var le=N.getParameter(de.MAX_TEXTURE_MAX_ANISOTROPY_EXT);return le===0&&(le=2),le}else return null};if(i=gt(),!i)return null;var l=[],p="attribute vec2 attrVertex;varying vec2 varyinTexCoordinate;uniform vec2 uniformOffset;void main(){varyinTexCoordinate=attrVertex+uniformOffset;gl_Position=vec4(attrVertex,0,1);}",m="precision mediump float;varying vec2 varyinTexCoordinate;void main() {gl_FragColor=vec4(varyinTexCoordinate,0,1);}",g=i.createBuffer();i.bindBuffer(i.ARRAY_BUFFER,g);var b=new Float32Array([-.2,-.9,0,.4,-.26,0,0,.732134444,0]);i.bufferData(i.ARRAY_BUFFER,b,i.STATIC_DRAW),g.itemSize=3,g.numItems=3;var E=i.createProgram(),P=i.createShader(i.VERTEX_SHADER);i.shaderSource(P,p),i.compileShader(P);var v=i.createShader(i.FRAGMENT_SHADER);i.shaderSource(v,m),i.compileShader(v),i.attachShader(E,P),i.attachShader(E,v),i.linkProgram(E),i.useProgram(E),E.vertexPosAttrib=i.getAttribLocation(E,"attrVertex"),E.offsetUniform=i.getUniformLocation(E,"uniformOffset"),i.enableVertexAttribArray(E.vertexPosArray),i.vertexAttribPointer(E.vertexPosAttrib,g.itemSize,i.FLOAT,!1,0,0),i.uniform2f(E.offsetUniform,1,1),i.drawArrays(i.TRIANGLE_STRIP,0,g.numItems);try{l.push(i.canvas.toDataURL())}catch{}l.push("extensions:"+(i.getSupportedExtensions()||[]).join(";")),l.push("webgl aliased line width range:"+o(i.getParameter(i.ALIASED_LINE_WIDTH_RANGE))),l.push("webgl aliased point size range:"+o(i.getParameter(i.ALIASED_POINT_SIZE_RANGE))),l.push("webgl alpha bits:"+i.getParameter(i.ALPHA_BITS)),l.push("webgl antialiasing:"+(i.getContextAttributes().antialias?"yes":"no")),l.push("webgl blue bits:"+i.getParameter(i.BLUE_BITS)),l.push("webgl depth bits:"+i.getParameter(i.DEPTH_BITS)),l.push("webgl green bits:"+i.getParameter(i.GREEN_BITS)),l.push("webgl max anisotropy:"+s(i)),l.push("webgl max combined texture image units:"+i.getParameter(i.MAX_COMBINED_TEXTURE_IMAGE_UNITS)),l.push("webgl max cube map texture size:"+i.getParameter(i.MAX_CUBE_MAP_TEXTURE_SIZE)),l.push("webgl max fragment uniform vectors:"+i.getParameter(i.MAX_FRAGMENT_UNIFORM_VECTORS)),l.push("webgl max render buffer size:"+i.getParameter(i.MAX_RENDERBUFFER_SIZE)),l.push("webgl max texture image units:"+i.getParameter(i.MAX_TEXTURE_IMAGE_UNITS)),l.push("webgl max texture size:"+i.getParameter(i.MAX_TEXTURE_SIZE)),l.push("webgl max varying vectors:"+i.getParameter(i.MAX_VARYING_VECTORS)),l.push("webgl max vertex attribs:"+i.getParameter(i.MAX_VERTEX_ATTRIBS)),l.push("webgl max vertex texture image units:"+i.getParameter(i.MAX_VERTEX_TEXTURE_IMAGE_UNITS)),l.push("webgl max vertex uniform vectors:"+i.getParameter(i.MAX_VERTEX_UNIFORM_VECTORS)),l.push("webgl max viewport dims:"+o(i.getParameter(i.MAX_VIEWPORT_DIMS))),l.push("webgl red bits:"+i.getParameter(i.RED_BITS)),l.push("webgl renderer:"+i.getParameter(i.RENDERER)),l.push("webgl shading language version:"+i.getParameter(i.SHADING_LANGUAGE_VERSION)),l.push("webgl stencil bits:"+i.getParameter(i.STENCIL_BITS)),l.push("webgl vendor:"+i.getParameter(i.VENDOR)),l.push("webgl version:"+i.getParameter(i.VERSION));try{var se=i.getExtension("WEBGL_debug_renderer_info");se&&(l.push("webgl unmasked vendor:"+i.getParameter(se.UNMASKED_VENDOR_WEBGL)),l.push("webgl unmasked renderer:"+i.getParameter(se.UNMASKED_RENDERER_WEBGL)))}catch{}return i.getShaderPrecisionFormat?(f(["FLOAT","INT"],function(N){f(["VERTEX","FRAGMENT"],function(de){f(["HIGH","MEDIUM","LOW"],function(le){f(["precision","rangeMin","rangeMax"],function(fe){var bt=i.getShaderPrecisionFormat(i[de+"_SHADER"],i[le+"_"+N])[fe];fe!=="precision"&&(fe="precision "+fe);var Ye=["webgl ",de.toLowerCase()," shader ",le.toLowerCase()," ",N.toLowerCase()," ",fe,":",bt].join("");l.push(Ye)})})})}),Xe(i),l):(Xe(i),l)},Pi=function(){try{var i=gt(),o=i.getExtension("WEBGL_debug_renderer_info"),s=i.getParameter(o.UNMASKED_VENDOR_WEBGL)+"~"+i.getParameter(o.UNMASKED_RENDERER_WEBGL);return Xe(i),s}catch{return null}},Ii=function(){var i=document.createElement("div");i.innerHTML="&nbsp;",i.className="adsbox";var o=!1;try{document.body.appendChild(i),o=document.getElementsByClassName("adsbox")[0].offsetHeight===0,document.body.removeChild(i)}catch{o=!1}return o},Oi=function(){if(typeof navigator.languages<"u")try{var i=navigator.languages[0].substr(0,2);if(i!==navigator.language.substr(0,2))return!0}catch{return!0}return!1},Ri=function(){return window.screen.width<window.screen.availWidth||window.screen.height<window.screen.availHeight},Mi=function(){var i=navigator.userAgent.toLowerCase(),o=navigator.oscpu,s=navigator.platform.toLowerCase(),l;i.indexOf("windows phone")>=0?l="Windows Phone":i.indexOf("windows")>=0||i.indexOf("win16")>=0||i.indexOf("win32")>=0||i.indexOf("win64")>=0||i.indexOf("win95")>=0||i.indexOf("win98")>=0||i.indexOf("winnt")>=0||i.indexOf("wow64")>=0?l="Windows":i.indexOf("android")>=0?l="Android":i.indexOf("linux")>=0||i.indexOf("cros")>=0||i.indexOf("x11")>=0?l="Linux":i.indexOf("iphone")>=0||i.indexOf("ipad")>=0||i.indexOf("ipod")>=0||i.indexOf("crios")>=0||i.indexOf("fxios")>=0?l="iOS":i.indexOf("macintosh")>=0||i.indexOf("mac_powerpc)")>=0?l="Mac":l="Other";var p="ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;if(p&&l!=="Windows"&&l!=="Windows Phone"&&l!=="Android"&&l!=="iOS"&&l!=="Other"&&i.indexOf("cros")===-1)return!0;if(typeof o<"u"){if(o=o.toLowerCase(),o.indexOf("win")>=0&&l!=="Windows"&&l!=="Windows Phone")return!0;if(o.indexOf("linux")>=0&&l!=="Linux"&&l!=="Android")return!0;if(o.indexOf("mac")>=0&&l!=="Mac"&&l!=="iOS")return!0;if((o.indexOf("win")===-1&&o.indexOf("linux")===-1&&o.indexOf("mac")===-1)!=(l==="Other"))return!0}if(s.indexOf("win")>=0&&l!=="Windows"&&l!=="Windows Phone")return!0;if((s.indexOf("linux")>=0||s.indexOf("android")>=0||s.indexOf("pike")>=0)&&l!=="Linux"&&l!=="Android")return!0;if((s.indexOf("mac")>=0||s.indexOf("ipad")>=0||s.indexOf("ipod")>=0||s.indexOf("iphone")>=0)&&l!=="Mac"&&l!=="iOS")return!0;if(s.indexOf("arm")>=0&&l==="Windows Phone")return!1;if(s.indexOf("pike")>=0&&i.indexOf("opera mini")>=0)return!1;var m=s.indexOf("win")<0&&s.indexOf("linux")<0&&s.indexOf("mac")<0&&s.indexOf("iphone")<0&&s.indexOf("ipad")<0&&s.indexOf("ipod")<0;return m!==(l==="Other")?!0:typeof navigator.plugins>"u"&&l!=="Windows"&&l!=="Windows Phone"},Di=function(){var i=navigator.userAgent.toLowerCase(),o=navigator.productSub,s;if(i.indexOf("edge/")>=0||i.indexOf("iemobile/")>=0)return!1;if(i.indexOf("opera mini")>=0)return!1;if(i.indexOf("firefox/")>=0?s="Firefox":i.indexOf("opera/")>=0||i.indexOf(" opr/")>=0?s="Opera":i.indexOf("chrome/")>=0?s="Chrome":i.indexOf("safari/")>=0?i.indexOf("android 1.")>=0||i.indexOf("android 2.")>=0||i.indexOf("android 3.")>=0||i.indexOf("android 4.")>=0?s="AOSP":s="Safari":i.indexOf("trident/")>=0?s="Internet Explorer":s="Other",(s==="Chrome"||s==="Safari"||s==="Opera")&&o!=="20030107")return!0;var l=eval.toString().length;if(l===37&&s!=="Safari"&&s!=="Firefox"&&s!=="Other")return!0;if(l===39&&s!=="Internet Explorer"&&s!=="Other")return!0;if(l===33&&s!=="Chrome"&&s!=="AOSP"&&s!=="Opera"&&s!=="Other")return!0;var p;try{throw"a"}catch(m){try{m.toSource(),p=!0}catch{p=!1}}return p&&s!=="Firefox"&&s!=="Other"},Ft=function(){var i=document.createElement("canvas");return!!(i.getContext&&i.getContext("2d"))},Nt=function(){if(!Ft())return!1;var i=gt(),o=!!window.WebGLRenderingContext&&!!i;return Xe(i),o},Ui=function(){return navigator.appName==="Microsoft Internet Explorer"?!0:!!(navigator.appName==="Netscape"&&/Trident/.test(navigator.userAgent))},Fi=function(){return("msWriteProfilerMark"in window)+("msLaunchUri"in navigator)+("msSaveBlob"in navigator)>=2},Ni=function(){return typeof window.swfobject<"u"},Gi=function(){return window.swfobject.hasFlashPlayerVersion("9.0.0")},$i=function(i){var o=document.createElement("div");o.setAttribute("id",i.fonts.swfContainerId),document.body.appendChild(o)},Vi=function(i,o){var s="___fp_swf_loaded";window[s]=function(g){i(g)};var l=o.fonts.swfContainerId;$i();var p={onReady:s},m={allowScriptAccess:"always",menu:"false"};window.swfobject.embedSWF(o.fonts.swfPath,l,"1","1","9.0.0",!1,p,m,{})},gt=function(){var i=document.createElement("canvas"),o=null;try{o=i.getContext("webgl")||i.getContext("experimental-webgl")}catch{}return o||(o=null),o},Xe=function(i){var o=i.getExtension("WEBGL_lose_context");o?.loseContext()},Hi=[{key:"userAgent",getData:T},{key:"webdriver",getData:R},{key:"language",getData:j},{key:"colorDepth",getData:Ke},{key:"deviceMemory",getData:ze},{key:"pixelRatio",getData:Ae},{key:"hardwareConcurrency",getData:wi},{key:"screenResolution",getData:O},{key:"availableScreenResolution",getData:X},{key:"timezoneOffset",getData:ve},{key:"timezone",getData:ye},{key:"sessionStorage",getData:$},{key:"localStorage",getData:qe},{key:"indexedDb",getData:ht},{key:"addBehavior",getData:ti},{key:"openDatabase",getData:ri},{key:"cpuClass",getData:ii},{key:"platform",getData:ni},{key:"doNotTrack",getData:ai},{key:"plugins",getData:gi},{key:"canvas",getData:oi},{key:"webgl",getData:si},{key:"webglVendorAndRenderer",getData:li},{key:"adBlock",getData:ci},{key:"hasLiedLanguages",getData:ui},{key:"hasLiedResolution",getData:di},{key:"hasLiedOs",getData:fi},{key:"hasLiedBrowser",getData:pi},{key:"touchSupport",getData:yi},{key:"fonts",getData:hi,pauseBefore:!0},{key:"fontsFlash",getData:mi,pauseBefore:!0},{key:"audio",getData:D},{key:"enumerateDevices",getData:L}],oe=function(i){throw new Error("'new Fingerprint()' is deprecated, see https://github.com/fingerprintjs/fingerprintjs#upgrade-guide-from-182-to-200")};return oe.get=function(i,o){o?i||(i={}):(o=i,i={}),w(i,d),i.components=i.extraComponents.concat(Hi);var s={data:[],addPreprocessedComponent:function(m,g){typeof i.preprocessor=="function"&&(g=i.preprocessor(m,g)),s.data.push({key:m,value:g})}},l=-1,p=function(m){if(l+=1,l>=i.components.length){o(s.data);return}var g=i.components[l];if(i.excludes[g.key]){p(!1);return}if(!m&&g.pauseBefore){l-=1,setTimeout(function(){p(!0)},1);return}try{g.getData(function(b){s.addPreprocessedComponent(g.key,b),p(!1)},i)}catch(b){s.addPreprocessedComponent(g.key,String(b)),p(!1)}};p(!1)},oe.getPromise=function(i){return new Promise(function(o,s){oe.get(i,o)})},oe.getV18=function(i,o){return o==null&&(o=i,i={}),oe.get(i,function(s){for(var l=[],p=0;p<s.length;p++){var m=s[p];if(m.value===(i.NOT_AVAILABLE||"not available"))l.push({key:m.key,value:"unknown"});else if(m.key==="plugins")l.push({key:"plugins",value:y(m.value,function(b){var E=y(b[2],function(P){return P.join?P.join("~"):P}).join(",");return[b[0],b[1],E].join("::")})});else if(["canvas","webgl"].indexOf(m.key)!==-1&&Array.isArray(m.value))l.push({key:m.key,value:m.value.join("~")});else if(["sessionStorage","localStorage","indexedDb","addBehavior","openDatabase"].indexOf(m.key)!==-1)if(m.value)l.push({key:m.key,value:1});else continue;else m.value?l.push(m.value.join?{key:m.key,value:m.value.join(";")}:m):l.push({key:m.key,value:m.value})}var g=u(y(l,function(b){return b.value}).join("~~~"),31);o(g,l)})},oe.x64hash128=u,oe.VERSION="2.1.4",oe})});var ei=Ht(($e,Ce)=>{var ln=200,Or="__lodash_hash_undefined__",cn=800,un=16,Rr=9007199254740991,Mr="[object Arguments]",dn="[object Array]",fn="[object AsyncFunction]",pn="[object Boolean]",mn="[object Date]",hn="[object Error]",Dr="[object Function]",gn="[object GeneratorFunction]",bn="[object Map]",vn="[object Number]",yn="[object Null]",Ur="[object Object]",wn="[object Proxy]",_n="[object RegExp]",Sn="[object Set]",En="[object String]",xn="[object Undefined]",Cn="[object WeakMap]",Tn="[object ArrayBuffer]",kn="[object DataView]",An="[object Float32Array]",Ln="[object Float64Array]",Bn="[object Int8Array]",Pn="[object Int16Array]",In="[object Int32Array]",On="[object Uint8Array]",Rn="[object Uint8ClampedArray]",Mn="[object Uint16Array]",Dn="[object Uint32Array]",Un=/[\\^$.*+?()[\]{}|]/g,Fn=/^\[object .+?Constructor\]$/,Nn=/^(?:0|[1-9]\d*)$/,A={};A[An]=A[Ln]=A[Bn]=A[Pn]=A[In]=A[On]=A[Rn]=A[Mn]=A[Dn]=!0;A[Mr]=A[dn]=A[Tn]=A[pn]=A[kn]=A[mn]=A[hn]=A[Dr]=A[bn]=A[vn]=A[Ur]=A[_n]=A[Sn]=A[En]=A[Cn]=!1;var Fr=typeof global=="object"&&global&&global.Object===Object&&global,Gn=typeof self=="object"&&self&&self.Object===Object&&self,We=Fr||Gn||Function("return this")(),Nr=typeof $e=="object"&&$e&&!$e.nodeType&&$e,Ve=Nr&&typeof Ce=="object"&&Ce&&!Ce.nodeType&&Ce,Gr=Ve&&Ve.exports===Nr,xt=Gr&&Fr.process,xr=function(){try{var t=Ve&&Ve.require&&Ve.require("util").types;return t||xt&&xt.binding&&xt.binding("util")}catch{}}(),Cr=xr&&xr.isTypedArray;function $r(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}function $n(t,e){for(var r=-1,n=Array(t);++r<t;)n[r]=e(r);return n}function Vn(t){return function(e){return t(e)}}function Hn(t,e){return t?.[e]}function Wn(t,e){return function(r){return t(e(r))}}var jn=Array.prototype,Kn=Function.prototype,ct=Object.prototype,Ct=We["__core-js_shared__"],ut=Kn.toString,ne=ct.hasOwnProperty,Tr=function(){var t=/[^.]+$/.exec(Ct&&Ct.keys&&Ct.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),Vr=ct.toString,zn=ut.call(Object),qn=RegExp("^"+ut.call(ne).replace(Un,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),st=Gr?We.Buffer:void 0,kr=We.Symbol,Ar=We.Uint8Array,Lr=st?st.allocUnsafe:void 0,Hr=Wn(Object.getPrototypeOf,Object),Br=Object.create,Xn=ct.propertyIsEnumerable,Yn=jn.splice,ge=kr?kr.toStringTag:void 0,lt=function(){try{var t=It(Object,"defineProperty");return t({},"",{}),t}catch{}}(),Zn=st?st.isBuffer:void 0,Pr=Math.max,Jn=Date.now,Wr=It(We,"Map"),He=It(Object,"create"),Qn=function(){function t(){}return function(e){if(!ie(e))return{};if(Br)return Br(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();function be(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ea(){this.__data__=He?He(null):{},this.size=0}function ta(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}function ra(t){var e=this.__data__;if(He){var r=e[t];return r===Or?void 0:r}return ne.call(e,t)?e[t]:void 0}function ia(t){var e=this.__data__;return He?e[t]!==void 0:ne.call(e,t)}function na(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=He&&e===void 0?Or:e,this}be.prototype.clear=ea;be.prototype.delete=ta;be.prototype.get=ra;be.prototype.has=ia;be.prototype.set=na;function ae(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function aa(){this.__data__=[],this.size=0}function oa(t){var e=this.__data__,r=dt(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():Yn.call(e,r,1),--this.size,!0}function sa(t){var e=this.__data__,r=dt(e,t);return r<0?void 0:e[r][1]}function la(t){return dt(this.__data__,t)>-1}function ca(t,e){var r=this.__data__,n=dt(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}ae.prototype.clear=aa;ae.prototype.delete=oa;ae.prototype.get=sa;ae.prototype.has=la;ae.prototype.set=ca;function Te(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}function ua(){this.size=0,this.__data__={hash:new be,map:new(Wr||ae),string:new be}}function da(t){var e=pt(this,t).delete(t);return this.size-=e?1:0,e}function fa(t){return pt(this,t).get(t)}function pa(t){return pt(this,t).has(t)}function ma(t,e){var r=pt(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}Te.prototype.clear=ua;Te.prototype.delete=da;Te.prototype.get=fa;Te.prototype.has=pa;Te.prototype.set=ma;function ke(t){var e=this.__data__=new ae(t);this.size=e.size}function ha(){this.__data__=new ae,this.size=0}function ga(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function ba(t){return this.__data__.get(t)}function va(t){return this.__data__.has(t)}function ya(t,e){var r=this.__data__;if(r instanceof ae){var n=r.__data__;if(!Wr||n.length<ln-1)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new Te(n)}return r.set(t,e),this.size=r.size,this}ke.prototype.clear=ha;ke.prototype.delete=ga;ke.prototype.get=ba;ke.prototype.has=va;ke.prototype.set=ya;function wa(t,e){var r=Lt(t),n=!r&&At(t),a=!r&&!n&&Xr(t),c=!r&&!n&&!a&&Zr(t),u=r||n||a||c,d=u?$n(t.length,String):[],f=d.length;for(var y in t)(e||ne.call(t,y))&&!(u&&(y=="length"||a&&(y=="offset"||y=="parent")||c&&(y=="buffer"||y=="byteLength"||y=="byteOffset")||zr(y,f)))&&d.push(y);return d}function Tt(t,e,r){(r!==void 0&&!mt(t[e],r)||r===void 0&&!(e in t))&&Bt(t,e,r)}function _a(t,e,r){var n=t[e];(!(ne.call(t,e)&&mt(n,r))||r===void 0&&!(e in t))&&Bt(t,e,r)}function dt(t,e){for(var r=t.length;r--;)if(mt(t[r][0],e))return r;return-1}function Bt(t,e,r){e=="__proto__"&&lt?lt(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var Sa=Ra();function ft(t){return t==null?t===void 0?xn:yn:ge&&ge in Object(t)?Ma(t):$a(t)}function Ir(t){return je(t)&&ft(t)==Mr}function Ea(t){if(!ie(t)||Na(t))return!1;var e=Rt(t)?qn:Fn;return e.test(ja(t))}function xa(t){return je(t)&&Yr(t.length)&&!!A[ft(t)]}function Ca(t){if(!ie(t))return Ga(t);var e=qr(t),r=[];for(var n in t)n=="constructor"&&(e||!ne.call(t,n))||r.push(n);return r}function Pt(t,e,r,n,a){t!==e&&Sa(e,function(c,u){if(a||(a=new ke),ie(c))Ta(t,e,u,r,Pt,n,a);else{var d=n?n(kt(t,u),c,u+"",t,e,a):void 0;d===void 0&&(d=c),Tt(t,u,d)}},Jr)}function Ta(t,e,r,n,a,c,u){var d=kt(t,r),f=kt(e,r),y=u.get(f);if(y){Tt(t,r,y);return}var w=c?c(d,f,r+"",t,e,u):void 0,L=w===void 0;if(L){var C=Lt(f),D=!C&&Xr(f),T=!C&&!D&&Zr(f);w=f,C||D||T?Lt(d)?w=d:Ka(d)?w=Pa(d):D?(L=!1,w=Aa(f,!0)):T?(L=!1,w=Ba(f,!0)):w=[]:za(f)||At(f)?(w=d,At(d)?w=qa(d):(!ie(d)||Rt(d))&&(w=Da(f))):L=!1}L&&(u.set(f,w),a(w,f,n,c,u),u.delete(f)),Tt(t,r,w)}function jr(t,e){return Ha(Va(t,e,Qr),t+"")}var ka=lt?function(t,e){return lt(t,"toString",{configurable:!0,enumerable:!1,value:Za(e),writable:!0})}:Qr;function Aa(t,e){if(e)return t.slice();var r=t.length,n=Lr?Lr(r):new t.constructor(r);return t.copy(n),n}function La(t){var e=new t.constructor(t.byteLength);return new Ar(e).set(new Ar(t)),e}function Ba(t,e){var r=e?La(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}function Pa(t,e){var r=-1,n=t.length;for(e||(e=Array(n));++r<n;)e[r]=t[r];return e}function Ia(t,e,r,n){var a=!r;r||(r={});for(var c=-1,u=e.length;++c<u;){var d=e[c],f=n?n(r[d],t[d],d,r,t):void 0;f===void 0&&(f=t[d]),a?Bt(r,d,f):_a(r,d,f)}return r}function Oa(t){return jr(function(e,r){var n=-1,a=r.length,c=a>1?r[a-1]:void 0,u=a>2?r[2]:void 0;for(c=t.length>3&&typeof c=="function"?(a--,c):void 0,u&&Ua(r[0],r[1],u)&&(c=a<3?void 0:c,a=1),e=Object(e);++n<a;){var d=r[n];d&&t(e,d,n,c)}return e})}function Ra(t){return function(e,r,n){for(var a=-1,c=Object(e),u=n(e),d=u.length;d--;){var f=u[t?d:++a];if(r(c[f],f,c)===!1)break}return e}}function Kr(t,e,r,n,a,c){return ie(t)&&ie(e)&&(c.set(e,t),Pt(t,e,void 0,Kr,c),c.delete(e)),t}function pt(t,e){var r=t.__data__;return Fa(e)?r[typeof e=="string"?"string":"hash"]:r.map}function It(t,e){var r=Hn(t,e);return Ea(r)?r:void 0}function Ma(t){var e=ne.call(t,ge),r=t[ge];try{t[ge]=void 0;var n=!0}catch{}var a=Vr.call(t);return n&&(e?t[ge]=r:delete t[ge]),a}function Da(t){return typeof t.constructor=="function"&&!qr(t)?Qn(Hr(t)):{}}function zr(t,e){var r=typeof t;return e=e??Rr,!!e&&(r=="number"||r!="symbol"&&Nn.test(t))&&t>-1&&t%1==0&&t<e}function Ua(t,e,r){if(!ie(r))return!1;var n=typeof e;return(n=="number"?Ot(r)&&zr(e,r.length):n=="string"&&e in r)?mt(r[e],t):!1}function Fa(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function Na(t){return!!Tr&&Tr in t}function qr(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||ct;return t===r}function Ga(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}function $a(t){return Vr.call(t)}function Va(t,e,r){return e=Pr(e===void 0?t.length-1:e,0),function(){for(var n=arguments,a=-1,c=Pr(n.length-e,0),u=Array(c);++a<c;)u[a]=n[e+a];a=-1;for(var d=Array(e+1);++a<e;)d[a]=n[a];return d[e]=r(u),$r(t,this,d)}}function kt(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}var Ha=Wa(ka);function Wa(t){var e=0,r=0;return function(){var n=Jn(),a=un-(n-r);if(r=n,a>0){if(++e>=cn)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function ja(t){if(t!=null){try{return ut.call(t)}catch{}try{return t+""}catch{}}return""}function mt(t,e){return t===e||t!==t&&e!==e}var At=Ir(function(){return arguments}())?Ir:function(t){return je(t)&&ne.call(t,"callee")&&!Xn.call(t,"callee")},Lt=Array.isArray;function Ot(t){return t!=null&&Yr(t.length)&&!Rt(t)}function Ka(t){return je(t)&&Ot(t)}var Xr=Zn||Ja;function Rt(t){if(!ie(t))return!1;var e=ft(t);return e==Dr||e==gn||e==fn||e==wn}function Yr(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Rr}function ie(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}function je(t){return t!=null&&typeof t=="object"}function za(t){if(!je(t)||ft(t)!=Ur)return!1;var e=Hr(t);if(e===null)return!0;var r=ne.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&ut.call(r)==zn}var Zr=Cr?Vn(Cr):xa;function qa(t){return Ia(t,Jr(t))}var Xa=jr(function(t){return t.push(void 0,Kr),$r(Ya,void 0,t)});function Jr(t){return Ot(t)?wa(t,!0):Ca(t)}var Ya=Oa(function(t,e,r,n){Pt(t,e,r,n)});function Za(t){return function(){return t}}function Qr(t){return t}function Ja(){return!1}Ce.exports=Xa});var Je=(t,e,r="default")=>{let n=document.createElement("li");if(n.classList.add("sl-popup-item"),n.setAttribute("data-type",r),r!="default"){let f=document.createElement("div");f.classList.add("sl-popup-icon"),f.classList.add(`sl-popup-${r}-icon`),n.appendChild(f)}let a=document.createElement("div");a.classList.add("sl-popup-close"),n.appendChild(a),a.addEventListener("click",()=>n.remove());let c=document.createElement("div");c.classList.add("sl-popup-text-container");let u=document.createElement("h3");u.innerText=t,c.appendChild(u);let d=document.createElement("p");if(d.innerHTML=e,c.appendChild(d),n.appendChild(c),document.getElementById("sl-popup-container"))document.getElementById("sl-popup-container").appendChild(n);else{let f=document.createElement("ul");f.id="sl-popup-container",f.appendChild(n),document.getElementsByTagName("body")[0].appendChild(f)}},Le=(t,e)=>{Je(t,e,"success")},Be=(t,e)=>{Je(t,e,"warning")},yt=(t,e)=>{Je(t,e,"error")},J=(t,e)=>{Je(t,e)};function et(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r)t[n]=r[n]}return t}var en={read:function(t){return t[0]==='"'&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}};function wt(t,e){function r(a,c,u){if(!(typeof document>"u")){u=et({},e,u),typeof u.expires=="number"&&(u.expires=new Date(Date.now()+u.expires*864e5)),u.expires&&(u.expires=u.expires.toUTCString()),a=encodeURIComponent(a).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var d="";for(var f in u)!u[f]||(d+="; "+f,u[f]!==!0&&(d+="="+u[f].split(";")[0]));return document.cookie=a+"="+t.write(c,a)+d}}function n(a){if(!(typeof document>"u"||arguments.length&&!a)){for(var c=document.cookie?document.cookie.split("; "):[],u={},d=0;d<c.length;d++){var f=c[d].split("="),y=f.slice(1).join("=");try{var w=decodeURIComponent(f[0]);if(u[w]=t.read(y,w),a===w)break}catch{}}return a?u[a]:u}}return Object.create({set:r,get:n,remove:function(a,c){r(a,"",et({},c,{expires:-1}))},withAttributes:function(a){return wt(this.converter,et({},this.attributes,a))},withConverter:function(a){return wt(et({},this.converter,a),this.attributes)}},{attributes:{value:Object.freeze(e)},converter:{value:Object.freeze(t)}})}var tn=wt(en,{path:"/"}),H=tn;var S=t=>new URLSearchParams(window.location.search).get(t),Pe=()=>(window.location.origin+window.location.pathname).replace(/\/$/,""),Se=t=>new RegExp("^"+t.split(/\*+/).map(rn).join(".*")+"$"),rn=t=>t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");var W=t=>{let e=new Event(`sl:${t}`);document.dispatchEvent(e)},Q=()=>!!S("SLVerifyInstall"),Ie=()=>Q()&&S("SLVerifyInstall").includes("MF"),K=()=>Q()&&S("SLVerifyInstall").includes("upscribe"),tt=()=>Q()&&S("SLVerifyInstall").includes("partner_program"),U=()=>window.SL.config.test_mode||S("test_mode")=="true",G=()=>S("debug")=="true",pe=()=>S("partner_mode")=="true",nn=()=>window.location.hostname==="referralhub.page",jt=()=>window.location.hostname==="upscribe.page",I=()=>window.SL.config||{},k=(t={})=>{let e=window.SL.visitor||{};return Object.keys(t).length&&(e=Object.assign(e,t)),window.SL.visitor=e,window.SL.visitor},B=(t=null)=>{let e=k();return t&&Object.keys(e).length&&(e.subscriber=t,W("subscriber-updated")),e.subscriber},an=()=>Q()?S("rh_ref"):k().referrer,Oe=(t=null)=>{let e=I().widgets.upscribes;return t?e.find(n=>n.uuid==t):e[0]},me=()=>{let t=k();return{uuid:I().uuid,referrer_code:an(),campaign_id:t.campaign,utm_source:t.utm_source,utm_campaign:t.utm_campaign,fingerprint:t.fingerprint,origin:t.origin,email:t.email}},_t=()=>S("flash_messages")=="true",Kt=()=>{U()&&_t()&&J("TEST MODE ENABLED","You're currently in test mode. No data will be stored while in test mode")},zt=()=>window.SLConfig.plan!="lite_v3"||U()||nn(),ee=(t,e,r=30)=>{if(Q()||U())return!1;let n=window.location.hostname.replace("www.","");e&&(H.set(t,e,{expires:r,domain:`.${n}`}),console.log(`${t} tracked`))},qt=()=>{document.documentElement.style.setProperty("--sl-widgets-font-family","-apple-system, system-ui"),document.documentElement.style.setProperty("--sl-widgets-base-unit","16px")},rt=(t,e)=>{let r=`sparkloop-${t}-custom-css`;document.getElementById(r)&&document.getElementById(r).remove();var n=document.createElement("style");n.type="text/css",n.id=r,n.textContent=e,document.head.appendChild(n)},Re=t=>{let e=`sparkloop-${t}-style`;if(document.querySelector(`link#${e}`))return;let r=document.createElement("link");r.id=e,r.setAttribute("rel","stylesheet"),r.setAttribute("href",`${window.SLConfig.app_url}/styles/${t}.css`),document.head.appendChild(r)},Me=t=>{let e=document.createElement("link");e.setAttribute("rel","preload"),e.setAttribute("as","image"),e.setAttribute("href",t),document.head.appendChild(e)},Xt=(t,e,r)=>{let n;if(document.body.createTextRange){let a=document.body.createTextRange();a.moveToElementText(t),a.select()}else if(window.getSelection&&document.createRange){t.readOnly=!1;let a=document.createRange();a.selectNodeContents(t);let c=window.getSelection();c.removeAllRanges(),c.addRange(a),(t.nodeName=="TEXTAREA"||t.nodeName=="INPUT")&&t.select(),t.setSelectionRange&&navigator.userAgent.match(/ipad|ipod|iphone/i)&&(t.setSelectionRange(0,999999),t.readOnly=!0)}try{n=document.execCommand("copy")}catch{n=!1}if(n){let a=e.textContent,c=r;e.textContent=c,setTimeout(()=>e.textContent=a,500),console.log("Referral link copied to clipboard.")}},it=t=>t.querySelector(`input[type*="email"],
                              input[type*="Email"],
                              input[type*="EMAIL"],
                              input[name*="EMAIL"],
                              input[name*="email"],
                              input[name*="Email"],
                              input[for*="email"],
                              input[for*="Email"],
                              input[for*="EMAIL"]`),Yt=t=>t.querySelector(`input[type*="submit"],
                              input[type*="image"],
                              button[type*="submit"],
                              button:not([type])`),Zt=t=>{let e=!1,r=!1;return t.forEach(n=>{n.querySelector(".gform_body")&&(e=!0),it(n)&&(r=!0)}),e&&!r},St=t=>t.hasAttribute("data-sv-form"),nt=t=>t.toString().replace(/\B(?=(\d{3})+(?!\d))/g,","),x=({type:t="div",id:e="",classes:r="",text:n="",html:a="",parent:c,attributes:u={}}={})=>{let d=document.createElement(t);e&&(d.id=e),r&&(d.className=r),n&&(d.innerText=n),a&&(d.innerHTML=a),c&&c.appendChild(d);for(let f in u)d.setAttribute(f,u[f]);return d},Jt=(t,e,r="")=>{let n=`https://sparkloop.app/${r}?utm_campaign=powered-by&utm_source=${t}&utm_medium=${I().uuid}`;return x({type:"a",attributes:{href:n,target:"_blank"},text:"\u26A1\uFE0F by SparkLoop",parent:e})},Qt=()=>{let t=()=>x({html:"<!-- Sparkloop: this plan doesn't support widgets -->"}),e={get:function(){return t}};return new Proxy({},e)};var F=async(t,e,r="POST",n={})=>{let a=I(),c=`${a.script_url}/${a.uuid}`,u={method:r,headers:{"Content-Type":"application/json"},keepalive:!0,...n};return r!=="GET"&&e&&(u={...u,body:JSON.stringify(e)}),await(await fetch(c+t,u)).json()},at=t=>F("/add_subscriber",t).then(e=>e),er=t=>F(`/campaigns/${t.campaign_id}/verify_script`,t).then(e=>e),tr=t=>F(`/campaigns/${t.campaign_id}/test_referral`,t).then(e=>e),rr=(t,e)=>F(`/upscribes/${t}/add_log`,e).then(r=>r),ir=t=>F(`/upscribes/${t}/verify_script`).then(e=>e),nr=t=>F(`/partner_programs/${t}/verify_script`).then(e=>e),ar=t=>F(`/upscribes/${t}/test_widget`).then(e=>e),or=t=>F(`/partner_programs/${t}/test_referral`).then(e=>e),sr=t=>F(`/partner_campaigns/${t}/partner_test`).then(e=>e),De=(t,e)=>F(`/upscribes/${t}/add_event`,e).then(r=>r);var lr=t=>F("/check_referral_code",t).then(e=>e),cr=t=>F("/check_partner_code",t).then(e=>e),ur=(t,e)=>F("/get_subscriber",{subscriber:t,...e}).then(r=>r.response==="error"?Promise.reject(r.message):Promise.resolve(r.subscriber)),dr=(t,e)=>F("/upsert_subscriber",{subscriber:t,...e}).then(r=>r.response==="error"?Promise.reject(r.message):Promise.resolve(r.subscriber)),fr=t=>F(`/campaigns/${t.campaign_id}/send_email_invite`,t).then(e=>Promise.resolve(e)).catch(()=>Promise.reject()),pr=t=>{let r=new AbortController,n=setTimeout(()=>r.abort(),2e3);return F(`/upscribes/${t}/recommendations`,null,"GET",{signal:r.signal}).then(a=>(clearTimeout(n),a)).catch(()=>(clearTimeout(n),{recommendations:[],recs_insights:[]}))};var Et=Wt(hr()),Ee="__sl",gr=`${Ee}-campaign`,br=`${Ee}-utm_campaign`,vr=`${Ee}-utm_source`,yr=`${Ee}-origin`,wr=`${Ee}-fingerprint`,_r=`${Ee}-referrer`,Ue=class{constructor(){this.config=I(),this.visitor={}}storeInfoCookies(){this.visitor.campaign&&ee(`${gr}-${this.config.uuid}`,this.visitor.campaign),this.visitor.utm_source&&ee(`${vr}-${this.config.uuid}`,this.visitor.utm_source),this.visitor.utm_campaign&&ee(`${br}-${this.config.uuid}`,this.visitor.utm_campaign),this.visitor.origin&&ee(`${yr}-${this.config.uuid}`,this.visitor.origin)}fetchCampaign(){let e=H.get(`${_r}-${this.config.uuid}`)?H.get(`${gr}-${this.config.uuid}`):S("sl_campaign");this.visitor.campaign=this.config.campaign||e||S("sl_campaign")}fetchUTMCampaign(){this.visitor.utm_campaign=this.config.utm_campaign||S("utm_campaign")||H.get(`${br}-${this.config.uuid}`)}fetchUTMSource(){let e=S("utm_source")||S("ref")||S("source"),r=H.get(`${vr}-${this.config.uuid}`),n=document.referrer&&new URL(document.referrer).hostname!=window.location.hostname?new URL(document.referrer).hostname.replace(/^www\./,""):null;this.visitor.utm_source=this.config.utm_source||e||n||r}fetchOrigin(){this.visitor.origin=this.config.origin||H.get(`${yr}-${this.config.uuid}`)}async fetchAndVerifyReferrer(){let e=`${_r}-${this.config.uuid}`,r=H.get(e);r&&(this.storeInfoCookies(),this.visitor.referrer=r);let n=S("rh_ref")||S("rh_partner");if(n){let a={uuid:this.config.uuid,referrer_code:n,campaign_id:this.visitor.campaign,utm_source:this.visitor.utm_source,utm_campaign:this.visitor.utm_campaign,fingerprint:this.visitor.fingerprint},c;try{S("rh_partner")?(c=await cr(a),console.log(`Partner Campaign Referral Code ${n} verified successfully`)):(c=await lr(a),console.log("REQ:",c),console.log(`Subscriber Referral code ${n} verified successfully`)),c.response=="ok"?(W("referrer-tracked"),ee(e,n),this.visitor.referrer=n,this.storeInfoCookies()):console.warn(c.message)}catch(u){console.error(u)}}}calculateFingerprint(){return new Promise((e,r)=>{(window.requestIdleCallback||window.setTimeout)(()=>{Et.default.get(a=>{let u=a.map(f=>f.value).map(f=>Array.isArray(f)||typeof f=="object"?JSON.stringify(f):f),d=Et.default.x64hash128(u.join(""),31);return e(d)})})})}async fetchFingerprint(){let e=H.get(wr);if(e)this.visitor.fingerprint=e;else try{let r=await this.calculateFingerprint();ee(wr,r),this.visitor.fingerprint=r}catch(r){console.error(r)}}async profile(){this.fetchCampaign(),this.fetchUTMSource(),this.fetchUTMCampaign(),this.fetchOrigin(),await this.fetchFingerprint(),await this.fetchAndVerifyReferrer(),k(this.visitor)}};var on="__sl",Sr=`${on}-subscriber`,z=class{constructor(){this.config=I()}subscriberId(){return H.get(`${Sr}-${this.config.uuid}`)||S("subscriber_id")}async fetch({subscriberId:e=null,campaign:r=null}={}){let n=U()?"fake_subscriber":e||this.subscriberId();if(!n)return Promise.reject("Subscriber ID or email not present");let a=me();r&&(a.campaign_id=r);try{let c=await ur(n,a);return this.store(c),Promise.resolve(c)}catch(c){return Promise.reject(c)}}async upsert({subscriber:e=null,campaign:r=null}={}){let n=U()?"fake_subscriber":e;if(!n)return Promise.reject();let a=me();r&&(a.campaign_id=r);try{let c=await dr(n,a);return this.store(c),Promise.resolve(c)}catch(c){return Promise.reject(c)}}store(e){B(e),ee(`${Sr}-${this.config.uuid}`,e.id),W("subscriber-loaded"),console.log("Subscriber set",{subscriber:e})}};var ce=class{constructor(){this.config=I(),this.visitor=k(),this.upscribe={},this.experiment=this.determineExperiment()}async load(e=null){if(this.fetchSettings(e),await this.fetchRecommendations(),this.upscribe){if(this.trackGenerationEvent(),this.upscribe.recommendations&&this.upscribe.recommendations.length==0){console.log("No recommendations available. Upscribe widget not loaded."),(this.shouldBeRedirected()||jt()&&this.upscribe.after_submission.redirect_url)&&(window.location.href=this.generateRedirectURL());return}this.loadStyles();let r=document.createElement("div");r.id="sl-overlay";let n=this.generateWidget({check_recommendations:!1});r.replaceChildren(n),document.body.appendChild(r),this.setupRecommendationObserver(),document.body.classList.add("sl-upscribe-open")}}generateWidget({check_recommendations:e=!0}={}){this.trackUpscribeShownEvent();let r=B(),n=r.email,a=this.upscribe,c;this.shouldBeRedirected()&&(c=this.generateRedirectURL());let u=()=>{confirm("Your Upscribe widget was successfully verified. You will be redirected back to SparkLoop soon.")&&(window.location.href=`${this.config.app_url}/upscribe/checklist?script_verified=true`)},d=x({id:"sparkloop-upscribe",classes:"sl-widget-body sl-zoomIn"}),f=()=>{d.classList.remove("sl-zoomIn");let O=document.querySelector("#sl-overlay")||d;O&&(O.addEventListener("animationend",()=>{O.remove()},{once:!0}),O.classList.add("sl-fadeOut"),document.body.classList.remove("sl-upscribe-open"))},y=x({classes:"sl-upscribe-thank-you-message",text:a.after_submission.thank_you_message,parent:d}),w=x({type:"form",attributes:{"data-sparkloop-form-ignore":!0},parent:d});U()&&d.classList.add("no-animation"),K()&&x({parent:w,classes:"sl-upscribe-verification",html:"To complete the verification, click on the submit button. <br/>Don't worry: no data will be recorded."});let L=x({type:"input",attributes:{type:"hidden",name:"sl-hp",autocomplete:!1},parent:w,classes:"sl-hidden"}),C=x({type:"button",attributes:{type:"submit"},text:a.button_label,classes:"sl-button"});C.disabled||(C.disabled=!0,setTimeout(()=>{C.disabled=!1},1500));let D=this.experiment,T=this.visitor.utm_source,R=this.visitor.utm_campaign,j=this.visitor.fingerprint;C.addEventListener("click",async O=>{if(O.preventDefault(),L.value){f();return}let q=w.querySelectorAll('input[type="checkbox"]:checked');if(q.length>0&&r){C.disabled=!0;let X=Array.from(q).map($=>$.value),Z=a.recommendations.map($=>$.ref_code),ve={subscriber:U()?"fake_subscriber":r.id,partner_campaigns:X.join(","),experiment:D,shown_recommendations:Z.join(","),fingerprint:j},ye=a.recommendations.map($=>{let qe=X.includes($.ref_code)?"subscribed":"skipped";return{partner_campaign_id:$.uuid,type:qe}});if(K())u();else try{await rr(a.uuid,ve),De(a.uuid,{type:"subscribed_to_recommendation",recommendation_events:ye,email:n,experiment:D,utm_source:T,utm_campaign:R,fingerprint:j}),this.shouldBeRedirected()?window.location.href=c.toString():(w.style.display="none",y.classList.add("show","sl-fadeIn"),setTimeout(()=>{f()},2500))}catch($){console.log($)}}});let Ke=x({type:"header",parent:w});a.header&&x({type:"h2",text:a.header,parent:Ke}),x({type:"p",text:a.subheader,parent:Ke});let ze=x({type:"ul",parent:w});a.recommendations.forEach(O=>{let q=x({type:"li",parent:ze}),X=x({type:"label",attributes:{for:`partner_campaign_${O.ref_code}`},parent:q}),Z=x({type:"main",parent:X});x({type:"figure",attributes:{style:`background-image: url("${O.publication_logo}")`},parent:Z});let ve=x({type:"div",parent:Z});x({type:"h3",text:O.publication_name,parent:ve}),x({type:"p",text:O.description,parent:ve});let ye=x({parent:X,classes:"sl-upscribe-checkbox"}),$=x({type:"input",id:`partner_campaign_${O.ref_code}`,attributes:{type:"checkbox",name:"partner_campaigns[]",value:O.ref_code},parent:ye});$.checked=e,$.addEventListener("change",function(qe){let ht=ze.querySelectorAll('input[type="checkbox"]:checked');C.disabled=ht.length===0}),x({type:"span",parent:ye})}),a.recommendations.length===0&&x({type:"div",classes:"sl-instructions",text:"You have no recommendations.",parent:w});let Ae=x({type:"footer",parent:w});if(a.recommendations.length>0&&(Ae.appendChild(C),x({type:"a",text:a.skip_link,attributes:{href:this.shouldBeRedirected()?c.toString():"#"},classes:"sl-skip-link",parent:Ae}).addEventListener("click",q=>{if(K())q.preventDefault(),u();else{let X=a.recommendations.map(Z=>({partner_campaign_id:Z.uuid,type:"skipped"}));De(a.uuid,{type:"skipped_all_recommendations",recommendation_events:X,email:n,experiment:D,fingerprint:j}),this.shouldBeRedirected()?((document.querySelector("#sl-overlay")||d).remove(),document.body.classList.remove("sl-upscribe-open")):(q.preventDefault(),f())}})),a.styling.powered_by_enabled){let O=x({type:"p",id:"sl-hub-powered-by",parent:Ae});Jt("upscribe",O,"upscribe")}return d}setupRecommendationObserver(){let e={rootMargin:"0px 0px -135px 0px",threshold:.3},r=new IntersectionObserver((a,c)=>{a.forEach(u=>{if(u.isIntersecting){let d=u.target,f=d.querySelector('input[type="checkbox"]');f&&(f.checked=!0),c.unobserve(d)}})},e);document.querySelectorAll("#sparkloop-upscribe > form > ul > li").forEach(a=>{r.observe(a)})}trackUpscribeShownEvent(){if(U()||K())return;let e=this.upscribe.recommendations.map(r=>({type:"shown",partner_campaign_id:r.uuid}));De(this.upscribe.uuid,{type:"shown",recommendation_events:e,email:B().email,experiment:this.experiment,utm_source:this.visitor.utm_source,utm_campaign:this.visitor.utm_campaign,fingerprint:this.visitor.fingerprint})}trackGenerationEvent(){if(U()||K())return;let e=this.upscribe.recs_insights;De(this.upscribe.uuid,{type:"generated",stats:e.stats,unfilled_reasons:e.unfilled_reasons,email:B().email,fingerprint:this.visitor.fingerprint})}loadStyles(){this.upscribe.recommendations.forEach(e=>Me(e.publication_logo)),Re("upscribe"),document.documentElement.style.setProperty("--sl-widgets-upscribe-primary-color",this.upscribe.styling.colors.primary),rt("upscribe",this.upscribe.styling.custom_css)}fetchSettings(e){this.upscribe=Oe(e)}async fetchRecommendations(){let e=await pr(this.upscribe.uuid);this.upscribe={...this.upscribe,...e}}shouldBeRedirected(){let{behaviour:e,custom_behaviour_rules:r}=this.upscribe.after_submission;if(e==="redirect")return!0;if(e==="custom_behaviour"){let n=Pe(),c=r.filter(d=>d.behaviour==="redirect").some(d=>{let f=Se(d.current_url);return n.match(f)}),u=r.every(d=>{let f=Se(d.current_url);return!n.match(f)});return c||u}return!1}findRedirectURL(){let e=Pe(),{default_redirect_url:r,custom_behaviour_rules:n}=this.upscribe.after_submission,c=n.filter(u=>u.behaviour==="redirect").find(u=>{let d=Se(u.current_url);return e.match(d)});return c?(console.log(`Redirection rule found for Upscribe ${this.upscribe.uuid} on ${c.current_url}`),c.redirect_url):(console.log(`No redirection rule found for Upscribe ${this.upscribe.uuid}. Redirecting to default URL: ${r}`),r)}generateRedirectURL(){let e=new URL(this.findRedirectURL()),r=B();r.email&&e.searchParams.append("email",r.email),e.searchParams.append("ref",this.config.widgets.upscribe_ref);let n=window.location.search;return new URLSearchParams(n).forEach(function(c,u){e.searchParams.append(u,c)}),e}determineExperiment(){return null}};var ue=class{constructor(){this.config=I(),this.formId=0,this.submittedFormsIds=[]}track(){!this.config.scan_forms||(this.trackStandardForms(),document.addEventListener("pico.user.registered",e=>this.trackPicoForms(e)),document.addEventListener("om.Optin.init.submit",e=>this.trackOptinMonsterForms(e)),window.addEventListener("klaviyoForms",e=>this.trackKlaviyoForms(e)),document.addEventListener("MemberSpace.conversion",e=>this.trackMemberSpaceForms(e)),document.addEventListener("ckjs:submission:complete",e=>this.trackConvertKitForms(e)),document.addEventListener("emailoctopus:form.success",e=>this.trackEmailOctopusForms(e)),document.addEventListener("cf:form_submitted:ok",e=>this.trackClickFunnelsForms(e)),document.addEventListener("gform/postRender",e=>this.trackGravityForms(e)),this.trackElementorForms(),this.trackSquareSpaceForms(),this.trackWisepopsForms(),this.trackDynamicForms())}trackForm(e){if(!e.hasAttribute("data-sparkloop-form-ignore")&&!St(e)&&!e.hasAttribute("data-sparkloop-form-id")){this.formId++,e.dataset.sparkloopFormId=this.formId,console.log("tracking form",e);let r=e.getAttribute("action");r&&!r.includes("#")?e.addEventListener("submit",n=>this.combFormForEmail(e),{once:!0}):this.trackAjaxForm(e)}}trackStandardForms(){document.querySelectorAll(this.config.form_selector||"form").forEach(r=>{this.trackForm(r)})}trackDynamicForms(){let e=n=>{n.forEach(a=>{a.target.querySelectorAll("form").forEach(c=>{this.trackForm(c)})})};new MutationObserver(e).observe(document.body,{childList:!0,subtree:!0})}trackAjaxForm(e){let r=it(e);if(r){r.addEventListener("keydown",function(a){a.key==="Enter"&&(console.log("Tracked ajax form submission by pressing ENTER key"),this.combFormForEmail(e))},{once:!0});let n=Yt(e);n&&n.addEventListener("click",()=>{console.log("Tracked ajax form submission by clicking submit button"),this.combFormForEmail(e)},{once:!0})}}trackKlaviyoForms(e){console.log("klaviyo form submitted",e),console.log("klaviyo event type",e.detail.type);let r,n=e.detail.type;if(n=="submit"||n=="stepSubmit"){let a=document.querySelector(`.klaviyo-form-${e.detail.formId}`);a&&(r=a.querySelector("form"));let c=e.detail.metaData.$email;if(c)k({email:c.trim()});else return;n=="submit"?this.captureSubscriber({form:r}):n=="stepSubmit"&&setTimeout(this.captureSubscriber({form:r}),1e3)}}trackPicoForms(e){console.log("pico form submitted",e),console.log("pico event email",e.detail.email.trim()),k({email:e.detail.email.trim()}),this.captureSubscriber()}trackOptinMonsterForms(e){console.log("optinMonster form submitted",e),console.log("optinMonster event email",e.detail.Optin.data.fields.email.trim()),k({email:e.detail.Optin.data.fields.email.trim()}),this.captureSubscriber()}trackElementorForms(){if(window.jQuery){let e=!!jQuery.fn.on,r=n=>this.combFormForEmail(n.target);e?jQuery(document).on("submit_success",r):jQuery(document).bind("submit_success",r)}}trackMemberSpaceForms({detail:e}){console.log("memberSpace form submitted",e);let{order:r,plan:n,member:a}=e;k({email:a.email.trim()}),this.captureSubscriber()}trackSquareSpaceForms(){var e=this;typeof Y<"u"&&typeof Y.all=="function"&&Y.all("form").each(function(r){r.on("submit",function(n){let a;typeof r._node=="string"?a=document.querySelector(r._node):a=r._node,a&&!St(a)&&e.combFormForEmail(a)})})}trackConvertKitForms(e){console.log("ConvertKit form submitted",e),console.log("ConvertKit event email",e.detail.email_address.trim()),k({email:e.detail.email_address.trim()}),e.detail.recommendations&&k({upscribeBlocked:!0}),this.captureSubscriber({form:e.target})}trackEmailOctopusForms(e){console.log("emailoctopus form submitted",e),console.log("emailoctopus event detail",e.detail);let r=document.querySelector("[eo-block='form']").querySelector("form")||document.querySelector(".emailoctopus-form");if(r){let n=e.detail.contact.email_address||r.querySelector("input[type=email]").value;k({email:n.trim()}),this.captureSubscriber({form:r})}}trackClickFunnelsForms(e){console.log("clickfunnels form submitted",e),console.log("clickfunnels event detail",e.detail);let r=e.detail.contact?.email;r&&(k({email:r.trim()}),this.captureSubscriber())}trackGravityForms(e){console.log("gravity form submitted",e),console.log("gravity event detail",e.detail),gform!==void 0&&gform.utils.addAsyncFilter("gform/submission/pre_submission",async r=>{let n=gform.utils.getNode(".gfield--type-email input",r.form,!0);n&&(k({email:n.trim()}),this.captureSubscriber({form:r.form}))})}trackWisepopsForms(){window.wisepops&&wisepops("listen","after-form-submit",e=>{console.log("wisepops form submitted",e),console.log("wisepops event detail",e.detail);let r=e.target.elements.email;r&&(k({email:r.value.trim()}),this.captureSubscriber({form:e.target}))})}combFormForEmail(e){if(this.submittedFormsIds.includes(e.dataset.formId))return;let r=it(e);r&&r.value&&(W("form-submitted"),console.log("email input detected",r),this.submittedFormsIds.push(e.dataset.formId),k({email:r.value.trim()}),this.captureSubscriber({form:e}))}async captureSubscriber({form:e=null}={}){let r=me();if(!r.email){console.log("No email found in the form submission");return}if(console.log("\u2705 Form submission tracked succesfully. Email captured: "+r.email),G()&&(window.onbeforeunload=function(){return"Are you sure you want to leave?"}),Q())if(pe()){this.completePartnerVerification();return}else{if(Ie()){this.completeCampaignVerification(r);return}if(K()){this.completeUpscribeVerification(e);return}if(tt()){this.completePartnerProgramVerification();return}}try{let n=await at(r);B(n.subscriber),this.loadUpscribe(e)}catch(n){console.log(n)}}async completePartnerVerification(){G()&&console.log("DEBUG: completePartnerVerification() called");try{let e=S("SLVerifyInstall");if(e){let r=await sr(e);G()&&console.log("DEBUG: completePartnerVerification() response",r),Le("[Step 3 of 3] Referral tracking working successfully","Your test referral was successful. You can now safely recommend this publication via your partner link."),setTimeout(()=>{window.open(`${this.config.app_url}/partner_profile/partner_campaigns/${e}`)},2500)}}catch(e){console.log(e.message)}}async completeCampaignVerification(e){try{let r=S("SLVerifyInstall");e.campaign_id=r,await tr(e),Le("[Step 3 of 3] Referral tracking working successfully",`SparkLoop was able to track the referral correctly via your form.

PS: If your form normally redirects to another page, don't worry. We have temporarily disabled the redirect to test the referral.

\u{1F449} you'll be redirected back to SparkLoop in a few seconds...`),setTimeout(()=>{window.open(`${this.config.app_url}/campaigns/${r}/checklist/script?verified=true`,"_blank")},4e3)}catch(r){console.log(r.message)}}async completeUpscribeVerification(e){G()&&console.log("DEBUG: completeUpscribeVerification() called");try{let r=S("SLVerifyInstall");await ar(r),G()&&console.log(`DEBUG: Upscribe ID ${r}`),this.loadUpscribe(e),Le("[Step 3 of 3] Signup tracking working successfully","SparkLoop was able to track the signup correctly via your form.<br/><br/>PS: If your form normally redirects to another page, don't worry. We have temporarily disabled the redirect to test the referral.<br/><br/>\u{1F449} you'll be redirected back to SparkLoop in a few seconds...")}catch(r){console.log(r.message)}}async completePartnerProgramVerification(){G()&&console.log("DEBUG: completePartnerProgramVerification() called");try{let e=S("SLVerifyInstall");await or(e),G()&&console.log(`DEBUG: PartnerProgram ID ${testPartnerProgramReferral}`),Le("[Step 3 of 3] Signup tracking working successfully","SparkLoop was able to track the signup correctly via your form.<br/><br/>PS: If your form normally redirects to another page, don't worry. We have temporarily disabled the redirect to test the referral.<br/><br/>\u{1F449} you'll be redirected back to SparkLoop in a few seconds..."),setTimeout(()=>{window.open(`${this.config.app_url}/partner_programs/${e}/checklist?script_verified=true`,"_blank")},4e3)}catch(e){console.log(e.message)}}getUpscribeId(e){if(G()&&console.log("DEBUG: getUpscribeId() called"),G()&&console.log(`DEBUG: form ${e}`),Ie())return;let r=this.config.widgets.upscribes.find(n=>{if(!K()&&!n.enabled)return console.log(`Upscribe ${n.uuid} is not enabled`),!1;if(n.visibility.installation!="widget")return console.log(`Upscribe ${n.uuid} is not set to be displayed as a widget`),!1;if(n.visibility.all_pages)return!0;let a=Pe(),c=n.visibility.rules.find(u=>{let d=Se(u);return a.match(d)});return c?(console.log(`Upscribe ${n.uuid} is set to be displayed on ${c}`),!0):(console.log(`Can't find a matching rule for Upscribe ${n.uuid}`),!1)});return G()&&console.log(`DEBUG: upscribe ${r}`),r?e?e.dataset.sparkloopUpscribe!=="false"?r.uuid:null:r.uuid:null}async loadUpscribe(e=null){if(G()&&console.log("DEBUG: loadUpscribe() called"),SL.config.upscribeDisabled){console.log("Upscribe is disabled");return}if(pe()){console.log("Upscribe is disabled in partner mode");return}if(k().upscribeShown){console.log("Upscribe has already been shown to this visitor");return}if(k().upscribeBlocked){console.log("Upscribe has been blocked for this visitor");return}let r=this.getUpscribeId(e);G()&&console.log(`DEBUG: upscribeId ${r}`),r&&(k({upscribeShown:!0}),new ce().load(r))}};var sn={"":["<em>","</em>"],_:["<strong>","</strong>"],"*":["<strong>","</strong>"],"~":["<s>","</s>"],"\n":["<br />"]," ":["<br />"],"-":["<hr />"]};function Er(t){return t.replace(RegExp("^"+(t.match(/^(\t| )+/)||"")[0],"gm"),"")}function Fe(t){return(t+"").replace(/"/g,"&quot;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function re(t,e){var r,n,a,c,u,d=/((?:^|\n+)(?:\n---+|\* \*(?: \*)+)\n)|(?:^``` *(\w*)\n([\s\S]*?)\n```$)|((?:(?:^|\n+)(?:\t|  {2,}).+)+\n*)|((?:(?:^|\n)([>*+-]|\d+\.)\s+.*)+)|(?:!\[([^\]]*?)\]\(([^)]+?)\))|(\[)|(\](?:\(([^)]+?)\))?)|(?:(?:^|\n+)([^\s].*)\n(-{3,}|={3,})(?:\n+|$))|(?:(?:^|\n+)(#{1,6})\s*(.+)(?:\n+|$))|(?:`([^`].*?)`)|(  \n\n*|\n{2,}|__|\*\*|[_*]|~~)/gm,f=[],y="",w=e||{},L=0;function C(T){var R=sn[T[1]||""],j=f[f.length-1]==T;return R?R[1]?(j?f.pop():f.push(T),R[0|j]):R[0]:T}function D(){for(var T="";f.length;)T+=C(f[f.length-1]);return T}for(t=t.replace(/^\[(.+?)\]:\s*(.+)$/gm,function(T,R,j){return w[R.toLowerCase()]=j,""}).replace(/^\n+|\n+$/g,"");a=d.exec(t);)n=t.substring(L,a.index),L=d.lastIndex,r=a[0],n.match(/[^\\](\\\\)*\\$/)||((u=a[3]||a[4])?r='<pre class="code '+(a[4]?"poetry":a[2].toLowerCase())+'"><code'+(a[2]?' class="language-'+a[2].toLowerCase()+'"':"")+">"+Er(Fe(u).replace(/^\n+|\n+$/g,""))+"</code></pre>":(u=a[6])?(u.match(/\./)&&(a[5]=a[5].replace(/^\d+/gm,"")),c=re(Er(a[5].replace(/^\s*[>*+.-]/gm,""))),u==">"?u="blockquote":(u=u.match(/\./)?"ol":"ul",c=c.replace(/^(.*)(\n|$)/gm,"<li>$1</li>")),r="<"+u+">"+c+"</"+u+">"):a[8]?r='<img src="'+Fe(a[8])+'" alt="'+Fe(a[7])+'">':a[10]?(y=y.replace("<a>",'<a href="'+Fe(a[11]||w[n.toLowerCase()])+'">'),r=D()+"</a>"):a[9]?r="<a>":a[12]||a[14]?r="<"+(u="h"+(a[14]?a[14].length:a[13]>"="?1:2))+">"+re(a[12]||a[15],w)+"</"+u+">":a[16]?r="<code>"+Fe(a[16])+"</code>":(a[17]||a[1])&&(r=C(a[17]||"--"))),y+=n,y+=r;return(y+t.substring(L)+D()).replace(/^\n+|\n+$/g,"")}var h=x,Ne=class{constructor({referral_hub:e={}}={}){this.config=I(),this.referral_hub=e}animateCSS=(e,r)=>new Promise((n,a)=>{e.classList.add(r);function c(u){u.stopPropagation(),e.classList.remove(r),n("Animation ended")}e.addEventListener("animationend",c,{once:!0})});socialSharingLink=(e,r)=>{let n;return r==="facebook"?n="https://www.facebook.com/sharer.php?u="+encodeURIComponent(this.referralLink("facebook")):r==="twitter"?n="https://twitter.com/intent/tweet?text="+encodeURIComponent(e.twitter.message+`

`+this.referralLink("twitter")):r==="email"?n="mailto:?subject="+encodeURIComponent(e.email.subject)+"&body="+encodeURIComponent(e.email.message+`

`+this.referralLink("email")):r==="whatsapp"?n="https://api.whatsapp.com/send?text="+encodeURIComponent(e.whatsapp.message+`

`+this.referralLink("whatsapp")):r==="facebook_messenger"?n=this.messengerLink():r==="linkedin"?n="https://www.linkedin.com/shareArticle?mini=true&url="+encodeURIComponent(this.referralLink("linkedin")):r==="reddit"?n="https://www.reddit.com/submit?url="+encodeURIComponent(this.referralLink("reddit"))+"&title="+e.reddit.message:r==="telegram"?n="https://t.me/share/url?url="+encodeURIComponent(this.referralLink("telegram"))+"&text"+encodeURIComponent(e.telegram.message):r==="line"&&(n="https://line.me/R/msg/text/?"+encodeURIComponent(e.line.message+`

`+this.referralLink("line"))),n};referralLink=(e=null)=>{let r=B();if(r){let n=r.referral_link;return e&&(n+=`?utm_source=${e}`),n}else return this.config.app_url+"?rh_ref=ABC123"};messengerLink=()=>{let e;return/Mobi|Android/i.test(navigator.userAgent)?e="fb-messenger://share?redirect_uri="+encodeURIComponent(this.config.default_url)+"&amp;link="+encodeURIComponent(this.referralLink("facebook_messenger")):e="https://www.facebook.com/dialog/send?app_id=189109296592814&link="+encodeURIComponent(this.referralLink("facebook_messenger"))+"&redirect_uri="+encodeURIComponent(this.config.default_url),e};poweredByLink=(e,r,n="")=>{let a=`https://sparkloop.app/${n}?utm_campaign=powered-by&utm_source=${e}&utm_medium=${this.config.uuid}`;return h({type:"a",attributes:{href:a,target:"_blank"},text:"\u26A1\uFE0F by SparkLoop",parent:r})};formWidget=({onSubmit:e})=>{let{form_widget:r}=this.referral_hub;r.cover_image.enabled&&Me(r.cover_image.url);let n=h({id:"sl-form-screen",classes:"sl-widget-body"});if(r.cover_image.enabled){n.classList.add("sl-cover-image","sl-cover-image--"+r.cover_image.position);let T=h({type:"figure",parent:n});h({type:"img",attributes:{src:r.cover_image.url},parent:T})}let a=h({type:"section",id:"sl-form-section",classes:"sl-form-section",parent:n}),c=h({classes:"sl-form-content",parent:a});r.header&&h({type:"h2",html:re(r.header),parent:c}),r.subheader&&h({type:"p",html:re(r.subheader),parent:c});let u=h({type:"form",parent:a,attributes:{"data-sparkloop-form-ignore":!0}}),d=h({classes:"sl-form-container",parent:u});if(r.form.name_input.enabled){let T={type:"text",name:"name",placeholder:r.form.name_input.placeholder};U()||(T.required=!0),h({type:"input",attributes:T,parent:d})}let f={type:"email",name:"email",placeholder:r.form.email_input.placeholder};U()||(f.required=!0);let y=h({type:"input",attributes:f,parent:d}),w=h({type:"button",attributes:{type:"submit"},classes:"sl-button",text:r.form.button.label,parent:d});u.addEventListener("submit",T=>{T.preventDefault(),T.stopPropagation(),y.value.length>0&&(w.disabled=!0,e(y.value).catch(R=>{console.log(R),w.disabled=!1}))});let L=h({type:"footer",parent:a});r.tabs.how_it_works.enabled&&(h({type:"a",attributes:{href:"#"},text:r.tabs.how_it_works.label,parent:L}).addEventListener("click",R=>{R.preventDefault(),R.stopPropagation(),this.animateCSS(a,"sl-fadeOutLeft").then(j=>{a.style.display="none",C.style.display="flex"})}),h({type:"span",text:"|",parent:L})),r.tabs.terms.enabled&&(h({type:"a",attributes:{href:r.tabs.terms.url},text:r.tabs.terms.label,parent:L}),h({type:"span",text:"|",parent:L})),this.referral_hub.styling.powered_by_enabled&&this.poweredByLink("referral-hub",L);let C=h({type:"section",id:"sl-how-it-works-section",classes:"sl-section-large",parent:n});return C.style.display="none",h({type:"a",classes:"sl-back-button",html:`
              <svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
                 viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
              <g>
                <path d="M256,0C114.8,0,0,114.8,0,256s114.8,256,256,256s256-114.8,256-256S397.2,0,256,0z M256,39.4
                  c119.8,0,216.6,96.8,216.6,216.6S375.8,472.6,256,472.6S39.4,375.8,39.4,256S136.2,39.4,256,39.4z M196.9,177.2L118.2,256
                  l78.8,78.8v-59.1h196.9v-39.4H196.9V177.2z"/>
              </g>
              </svg>
              <span>Back</span>
            `,attributes:{href:"#"},parent:C}).addEventListener("click",T=>{T.preventDefault(),T.stopPropagation(),this.animateCSS(C,"sl-fadeOutRight").then(R=>{a.style.display="flex",C.style.display="none"})}),h({type:"h2",text:r.tabs.how_it_works.label,parent:C}),h({type:"article",html:re(r.tabs.how_it_works.content),parent:C}),n};rewardsElement=()=>{let e=B();if(!e)return;let{hub_widget:r}=this.referral_hub,n=r.rewards.list,a=r.rewards.layout,c=h({type:"ul",id:"sl-rewards-section"});return c.classList.add(`sl-rewards-layout-${a}`),n.forEach((u,d)=>{d++;let f=e.rewards_won.includes(u.id),y=h({type:"li",classes:"sl-reward",parent:c});f&&y.classList.add("sl-reward-won");let w=h({type:"figure",classes:"sl-reward-image",parent:y});w.style.backgroundImage='url("'+u.image+'")';let L=h({classes:"sl-reward-referrals",parent:w});h(f?{type:"span",parent:L,html:`<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 36 36'>
                            <path fill='#fff' d="M12.8,28.7l-9.5-9.5c-0.4-0.4-0.4-1.1,0-1.6l1.5-1.5c0.4-0.4,1.1-0.4,1.6,0l7.2,7.2   l16-16c0.4-0.4,1.1-0.4,1.6,0l1.5,1.5c0.4,0.4,0.4,1.1,0,1.6L14.4,28.7C13.9,29.1,13.2,29.1,12.8,28.7z"/>
                          </svg>`}:{type:"span",text:u.referrals,parent:L});let C=h({classes:"sl-reward-info",parent:y});if(h({type:"h4",text:u.name,parent:C}),u.description)if(a=="horizontal"){let D=h({classes:"sl-reward-description hide",parent:w});h({type:"p",text:u.description,parent:D}),h({type:"span",parent:C,html:`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill='currentColor'>
                          <path fill='currentColor' d="M12,2A10,10,0,1,0,22,12,10.01114,10.01114,0,0,0,12,2Zm0,18a8,8,0,1,1,8-8A8.00917,8.00917,0,0,1,12,20Zm0-8.5a1,1,0,0,0-1,1v3a1,1,0,0,0,2,0v-3A1,1,0,0,0,12,11.5Zm0-4a1.25,1.25,0,1,0,1.25,1.25A1.25,1.25,0,0,0,12,7.5Z"/>
                        </svg>`}).addEventListener("click",function(R){D.classList.toggle("hide")})}else h({type:"p",text:u.description,parent:C});n.length<6||d==1||d==n.length||(n.length%5==0?d%5==0&&(y.classList.add("sl-before-break"),h({type:"span",classes:"sl-reward-break",parent:c})):n.length%4==0?d%4==0&&(y.classList.add("sl-before-break"),h({type:"span",classes:"sl-reward-break",parent:c})):n.length%3==0?d%3==0&&(y.classList.add("sl-before-break"),h({type:"span",classes:"sl-reward-break",parent:c})):d%4==0&&(y.classList.add("sl-before-break"),h({type:"span",classes:"sl-reward-break",parent:c})))}),c};sharingElement=()=>{if(!B())return;let{hub_widget:r}=this.referral_hub,n=h({type:"section",id:"sl-sharing-section"}),a=h({id:"sl-sharinglink-container",parent:n});if(h({type:"p",text:r.sharing.referral_link.header,parent:a}),a.appendChild(this.referralLinkElement()),r.sharing.social_links.enabled){let c=h({id:"sl-sociallinks-container",parent:n});h({type:"p",text:r.sharing.social_links.header,parent:c}),c.appendChild(this.socialIconsElement())}if(r.sharing.email_invitation.enabled){let c=h({id:"sl-emailinvitation-container",parent:n});h({type:"p",text:r.sharing.email_invitation.header,parent:c});let u=h({type:"span"});c.appendChild(this.emailInvitationElement(u)),c.appendChild(u)}return n};referralLinkElement=()=>{let e=B();if(!e)return;let{sharing:r}=this.referral_hub.hub_widget,n=h({type:"form",attributes:{"data-sparkloop-form-ignore":!0}}),a=h({type:"input",parent:n,attributes:{type:"text",readonly:!0,value:e.referral_link}}),c=h({type:"button",classes:"sl-button",parent:n,text:r.referral_link.button.label});return c.addEventListener("click",u=>{u.preventDefault(),Xt(a,c,r.referral_link.button.label)}),n};statsElement=()=>{let e=B();if(!e)return;let{referrals:r}=this.referral_hub.hub_widget,n=h({type:"section",id:"sl-referrals-section"});if(r.confirmed.enabled){let a=h({id:"sl-confirmed-referrals",parent:n});h({type:"h3",text:nt(e.referrals.confirmed),parent:a}),h({type:"span",text:r.confirmed.label,parent:a})}if(r.pending.enabled){let a=h({id:"sl-pending-referrals",parent:n});h({type:"h3",text:nt(e.referrals.pending),parent:a}),h({type:"span",text:r.pending.label,parent:a})}if(r.next.enabled){let a=h({id:"sl-next-referrals",parent:n});h({type:"h3",text:nt(e.next_reward),parent:a}),h({type:"span",text:r.next.label,parent:a})}return n};socialIconsElement=()=>{if(!B())return;let{hub_widget:r}=this.referral_hub,n=h({id:"sl-sociallinks-icons"});return["twitter","facebook","email","whatsapp","linkedin","telegram"].forEach(c=>{if(r.sharing.social_links.socials[c].enabled){let u=h({type:"a",classes:"sl-social",id:`sl-social-${c}`,attributes:{title:`Share on ${c}`,href:this.socialSharingLink(r.sharing.social_links.socials,c)}});u.style.backgroundImage="url(https://sparkloop-static-images.s3-us-west-1.amazonaws.com/"+c+".png)",n.appendChild(u)}}),n};emailInvitationElement=e=>{let r=B();if(!r)return;let{email_invitation:n}=this.referral_hub.hub_widget.sharing,a=h({type:"form",attributes:{"data-sparkloop-form-ignore":!0}}),c=h({type:"input",parent:a,classes:"sl-widget-input",attributes:{type:"text",placeholder:n.placeholder}}),u=h({type:"button",classes:"sl-button",parent:a,text:n.button.label});return u.addEventListener("click",async d=>{d.preventDefault(),d.stopPropagation(),u.disabled=!0,e.innerText="";let f=c.value.trim();if(f.length>0){let y={campaign_id:this.referral_hub.campaign_id,subscriber:r.id,recipients:f};try{await fr(y),c.value="",e.innerText=n.confirmation_message}catch{e.innerText="Server error. Please try again."}finally{u.disabled=!1}}}),a};hubWidget=()=>{if(!B())return;let{hub_widget:r}=this.referral_hub;r.rewards.list.forEach(c=>{Me(c.image)});let n=h({id:"sl-hub-screen",classes:"sl-widget-body"});if(r.header&&r.header.trim().length>0||r.subheader&&r.subheader.trim().length>0){let c=h({type:"header",parent:n});r.header&&r.header.trim().length>0&&h({type:"h2",html:re(r.header),parent:c}),r.subheader&&r.subheader.trim().length>0&&h({type:"p",html:re(r.subheader),parent:c})}r.rewards.enabled&&r.rewards.list.length>0&&n.appendChild(this.rewardsElement());let a=h({type:"main",id:"sl-hub-main",parent:n});if(a.appendChild(this.sharingElement()),(r.referrals.confirmed.enabled||r.referrals.pending.enabled||r.referrals.next.enabled)&&a.appendChild(this.statsElement()),this.referral_hub.styling.powered_by_enabled){let c=h({id:"sl-hub-powered-by",parent:n});this.poweredByLink("referral-hub",c)}return n}};var xe=class{constructor(){this.config=I(),this.referral_hub={}}async load(){if(this.loadDefaultStyles(),this.config.widgets.referral_hubs.length&&(this.fetchReferralHubSettings(),Object.keys(this.referral_hub).length)){try{await new z().fetch({campaign:this.referral_hub.campaign_id})}catch{console.error("Subscriber was not found")}U()&&_t()&&J("Referral Hub Preview",'To visualize the hub widget, signup using any name<br/>and "test@test.com" as email address.<br>When test mode is enabled no email will be recorded.'),this.loadReferralHubStyles(),this.loadReferralHubWidget(),this.generateReferralHubElements()}}components(){return zt()?new Ne({referral_hub:this.referral_hub}):Qt()}fetchReferralHubSettings(e){let r=this.config.widgets.referral_hubs;if(e)this.referral_hub=r.find(n=>n.campaign_id==e);else{let n=document.querySelector("#sparkloop-referral-hub")||document.querySelector("[class*=sparkloop-][data-campaign-id]");if(n){let a=n.dataset.campaignId;this.referral_hub=a?r.find(c=>c.campaign_id==a):r[0]}}}loadReferralHubWidget(){let e=document.querySelector("#sparkloop-referral-hub");!e||(B()?e.replaceChildren(this.generateHubWidget()):e.replaceChildren(this.generateFormWidget()))}generateFormWidget(){return this.components().formWidget({onSubmit:e=>this.validateAndHydrateSubscriber(e)})}generateHubWidget(){return this.components().hubWidget()}generateRewardsElement(){return this.components().rewardsElement()}generateSharingElement(){return this.components().sharingElement()}generateStatsElement(){return this.components().statsElement()}generateReferralHubElements(){if(B()){let e=(r,n)=>{let a=document.createElement("div");a.className="sl-widget-body sl-referral-hub-element",a.appendChild(n),r.replaceChildren(a)};document.querySelectorAll(`.sparkloop-rewards-element[data-campaign-id=${this.referral_hub.campaign_id}]`).forEach(r=>{e(r,this.generateRewardsElement())}),document.querySelectorAll(`.sparkloop-sharing-element[data-campaign-id=${this.referral_hub.campaign_id}]`).forEach(r=>{e(r,this.generateSharingElement())}),document.querySelectorAll(`.sparkloop-stats-element[data-campaign-id=${this.referral_hub.campaign_id}]`).forEach(r=>{e(r,this.generateStatsElement())})}}async validateAndHydrateSubscriber(e){try{await new z().upsert({subscriber:e,campaign:this.referral_hub.campaign_id}),this.loadReferralHubWidget(),this.generateReferralHubElements()}catch(r){W("subscriber-not-loaded"),console.log(`Subscriber not loaded ${r}`)}}loadDefaultStyles(){qt(),Re("default")}loadReferralHubStyles(){Re("referral_hub"),document.documentElement.style.setProperty("--sl-widgets-referral-hub-primary-color",this.referral_hub.styling.colors.primary),document.documentElement.style.setProperty("--sl-widgets-referral-hub-secondary-color",this.referral_hub.styling.colors.secondary),document.documentElement.style.setProperty("--sl-widgets-referral-hub-headers-color",this.referral_hub.styling.colors.headers),rt("referral_hub",this.referral_hub.styling.custom_css)}};var Ge=class{constructor(){this.config=I(),this.signup_email="signup@sparkloop.co"}timeoutTime(){return S("timeout")?parseInt(S("timeout")):15e3}async run(){if(Q()){let e;if(pe())J("[Step 1 of 3]  Referral testing process initiated","\u23F1 checking for a valid signup form on the page"),this.verifyReferralTracking();else try{let r=S("SLVerifyInstall");if(Ie())e=await er({campaign_id:r});else if(K()){if(console.log("upscribe settings",Oe(r)),Oe(r)==null)throw"Upscribe settings not found";e=await ir(r)}else tt()&&(e=await nr(r));console.log("script verified successfully",e),J("[Step 1 of 3] Script found on page","Your SparkLoop tracking script is correctly installed on this page.<br/><br/>\u{1F449} let's make sure SparkLoop can identify your email signup form(s)."),this.verifyReferralTracking()}catch(r){console.error("script verification failed",r),yt("Script verification failed","Please reload the page and try again.")}}}fetchForms(){return document.querySelectorAll(this.config.form_selector||"form")}verifyReferralTracking(){setTimeout(()=>{this.fetchForms().length?this.verifyForm():Zt(this.fetchForms())?Be("Gravity form detected","SparkLoop has detected a broken Gravity form on this page. <a href='https://help.sparkloop.app/en/articles/5855767-installing-the-tracking-script-on-wordpress#h_f004b7693e' target='_blank'>See instructions</a> on how to fix it"):(Be("We can't detect a valid form on this page","SparkLoop will try for another 15 seconds.<br/><br/>\u{1F449} if the form is inside a popup, try opening it (make the form appear on the page)"),setTimeout(()=>{this.fetchForms().length?this.verifyForm():yt("Bad news \u{1F61E}",`SparkLoop couldn't detect a valid form on this page.

If you get this error but the form is visible on the page, it's possible that the form is inside an iFrame or otherwise incompatible with our SparkLoop tracking script.

\u{1F449} contact our support team (support@sparkloop.app) to find a solution.`)},this.timeoutTime()))},1500)}verifyForm(){pe()?J("[Step 2 of 3] Make a test referral",`\u{1F449} Subscribe to this publication via the opt-in form on the page, using the email address <strong>${this.signup_email}</strong><br/><br/>Then wait up to 10 seconds for a success message to be shown.`):J("[Step 2 of 3] Valid form found",`SparkLoop has detected a valid email signup form on this page.

Now we need to check that our tracking script can track signups correctly via your form.<br/><br/><strong>\u{1F449} fill out and submit your form using the email address ${this.signup_email}</strong>`),new ue().track(),setTimeout(()=>{window.SL.visitor.email||(pe()?Be("Signup not yet detected",`We haven't been able to detect a valid referral yet.<br/><br/>If you haven't already followed the instructions in Step #2 (above), do so now.<br/><br/>If you have already subscribed with ${this.signup_email} and are seeing this message, it means referral tracking is broken for this publication. You should contact us via support@sparkloop.app and <strong>do not recommend</strong> this publication until the issue has been fixed.`):Be("Signup not yet detected",`SparkLoop hasn't been able to detect a valid signup yet.

\u{1F449} if you haven't submitted the form yet using ${this.signup_email}, please do so now.

If you have submitted the email signup form correctly, it's likely there's an error in the form which prevents us from tracking referrals correctly.

In this case, please contact our support team (support@sparkloop.app) and we'll help you find an easy solution!`))},this.timeoutTime())}};var Dt=Wt(ei());var Mt=class{constructor(e){this.config=e}widgets(e){let r=new xe;return r.fetchReferralHubSettings(e),r.loadReferralHubStyles(),r}async upscribe(e,r){try{await new z().fetch({subscriberId:r.trim()});let a=new ce;return a.fetchSettings(e),a.upscribe.recommendations||await a.fetchRecommendations(),a.loadStyles(),a.generateWidget()}catch(n){console.error(n)}}async upscribePopup(e,r){try{k({email:r.trim()});let n=await at(me());B(n.subscriber),new ce().load(e)}catch(n){console.error(n)}}generate={rewardsElement:e=>this.widgets(e).generateRewardsElement(),sharingElement:e=>this.widgets(e).generateSharingElement(),statsElement:e=>this.widgets(e).generateStatsElement(),formWidget:e=>this.widgets(e).generateFormWidget(),hubWidget:e=>this.widgets(e).generateHubWidget(),upscribeWidget:(e,r)=>this.upscribe(e,r),upscribePopup:(e,r)=>this.upscribePopup(e,r)};reset(e){this.config=(0,Dt.default)(e,window.SLConfig)}trackSubscriber(e){e?(k({email:e.trim()}),new ue().captureSubscriber()):console.error("Email can't be blank.")}async getSubscriber(e,r=null){try{let a=await new z().fetch({subscriberId:e.trim(),campaign:r});return Promise.resolve(a)}catch(n){return console.log(n),Promise.reject(n)}}async run(){W("ready"),G()&&console.log("DEBUG MODE IS ON"),Kt(),await new Ue().profile(),new Ge().run(),new ue().track();try{await new z().fetch()}catch(c){W("subscriber-not-loaded"),console.log(c)}new xe().load()}},Qa=(t,e=null)=>{if(!t.active)return console.warn("Sparkloop is disabled because the account is not active."),!1;let r=(0,Dt.default)(e||window.SL||{},t);if(window.SLConfig=t,r.disabled)return console.warn("SparkLoop has been manually disabled."),!1;r.test_mode&&console.warn("SparkLoop is running in test mode."),console.log("\u{1F64C} SparkLoop is loaded, time to rock'n'roll!"),console.log("Looking to grow your newsletter? Check out https://sparkloop.app/console");let n=new Mt(r);window.SL=n,n.run()};{let t=()=>{setTimeout(()=>{Qa(window.SLConfig)},window.sparkloop_delay||800)};document.readyState!=="loading"?t():(document.addEventListener("DOMContentLoaded",()=>t()),document.addEventListener("turbo:load",()=>t()))}})();
/*! js-cookie v3.0.1 | MIT */

})();